How to create a FAQ loop in NopCommerce instead of using topic blocks?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hello there gents,

I am pretty new to this nopCommerce platform it is pretty good but also pretty difficult to add new things. I am wondering if it is possible by any change to convert the static HTML FAQ accordion questions with a title and content to nopCommerce with a loop/repeater? Currently as far as i know it is only possible to create topic blocks for each single FAQ question. Is it possible to do this and could somebody guide me through this and help me how to do this?

I would really like to know how to do this.

Thanks in advance!

Warm regards,
Nino
6 years ago
Hello Nino,

You can think of 3 options:

1. Create 1 topic with all FAQ items and manage it as an HTML page.

2. Create FAQ topic template(https://<your store>/Admin/Template/TopicTemplates) and deploy your FAQ as static CSHTML page or add most of your JS and HTML into the template and change just FAQ content inside page body, e.g. render it as UL/LI tags, DL/DT/DD tags, etc.

3. Create a plugin for FAQ CMS. There is https://www.nopcommerce.com/p/2104/nop-faq-manager-a-responsive-nopcommerce-plugin.aspx, but I haven't used it myself.
6 years ago
ilich_x86 wrote:
Hello Nino,

You can think of 3 options:

1. Create 1 topic with all FAQ items and manage it as an HTML page.

2. Create FAQ topic template(https://<your store>/Admin/Template/TopicTemplates) and deploy your FAQ as static CSHTML page or add most of your JS and HTML into the template and change just FAQ content inside page body, e.g. render it as UL/LI tags, DL/DT/DD tags, etc.

3. Create a plugin for FAQ CMS. There is https://www.nopcommerce.com/p/2104/nop-faq-manager-a-responsive-nopcommerce-plugin.aspx, but I haven't used it myself.


Hi there Ilich,

First of thank you for your answers! I have decided that i will use topicBlocks however i have a problem.

I want to create a custom TopicBlock.cshtml => faqTopicBlock.cshtml and use this to overwrite the HTML output. I have created a topic with a single question: Title + Content included and use the default topicBlock as template. However when i create a custom Template it crashes and it isn't working.

What do i have to do to make this work?

@Html.Action("faqTopicBlock", "Topic", new { systemName = "faq-expect" })

Error: A public action method 'faqTopicBlock' was not found on controller 'Nop.Web.Controllers.TopicController'.

And created the faqTopicBlock.cshtml and selected the template.

Thanks again!
6 years ago
You should register your template at dbo.TopicTemplate table and then use TopicBlock Action, e.g. @Html.Action("TopicBlock", "Topic", new { systemName = "YouFAQPage" })
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.