Adding the FAQ page

To create a new Mr CMS page which will be used to display FAQ items, you will need to add a class in the Pages app folder:

public class ShowFaqs : Webpage     {     }

We will also want to add a view page in both admin and UI locations. Note that all pages in Mr CMS inhreit from the Webpage Class.

For the UI view it will be placed in  \Apps\FaqApp\Views\Pages\ShowFaqs.cshtml.

For now, we will simply include the default editable body content and nothing else. Eventually we will render FAQs under the body content:

@model MrCMS.Web.Apps.Faqs.Pages.ShowFaqs

@Editable(Model, faqs => faqs.BodyContent)

In the admin, we will simply place a file in place in the location \Apps\FaqApp\Areas\Admin\Views\Webpage\ShowFaqs.cshtml. This will be where we administer the FAQ items:

@model MrCMS.Web.Apps.Faqs.Pages.ShowFaqs

At this stage you would be able to add a new FAQs page to Mr CMS - go and try it. Right click on the root node in the webtree in admin and click add. Select FAQs page and you'll see you can add and view a basic page. Of course it doesn't do much yet.

Next: Setting up the FAQ item.