Initializing the FAQ Module
Every community module has a corresponding maintenance stored procedure to populate the database with settings required for the module to work. Specifically, we need to register content page types by inserting two records into Community_PageTypes:
one for an FAQ section page (to display a list of FAQs) and one for an FAQ page (showing a single FAQ in detail). We call the procedure Community_MaintenanceInitializeFaqs
, following the existing CSK naming convention. An excerpt registering the FAQ section page type is shown here:
IF NOT EXISTS (SELECT * FROM Community_PageTypes WHERE pageType_Name=’Faq Section’) BEGIN INSERT Community_PageTypes ( pageType_name, pageType_description, pageType_pageContent, pageType_IsSectionType, pageType_ServiceSelect ) VALUES ( ‘FAQ Section’, ‘Contains FAQs in a question and answer style format’, ‘ASPNET.StarterKit.Communities.Faqs.FaqSection’, 1, ‘Community_FaqsServiceSelect’ ) END ELSE PRINT ‘WARNING: The FAQ Module has already been...