Book Image

Building Websites with the ASP.NET Community Starter Kit

Book Image

Building Websites with the ASP.NET Community Starter Kit

Overview of this book

Microsoft's ASP.NET Community Starter Kit (CSK) is a powerful, freely available application that allows you to quickly create a fully featured community-driven website, complete with article and news management, downloads, forums, and user handling. Supported and tested by thousands of developers in the ASP.NET community across the world, the Community Starter Kit offers you the luxury of a scalable and extensible architecture, and the ability to brand your own site. This book will take you inside the Community Starter Kit, allowing you to harness its power for easily creating your own websites. The book is structured to help you understand, implement and extend the Community Starter Kit: Understand how the Community Starter Kit works. Build the skills to implement your own site. Develop the confidence to extend the system for your own needs. With this book, you will learn how to: Install and configure the CSK Find your way around the CSKs towering range of features Create and administer community websites Become familiar with the common CSK ASP.NET controls Customize your CSK site Discover the secrets of the CSK core architecture Explore the inner workings of CSK modules Extend the CSK by creating new modules Customize existing modules with Web controls Add an RSS feed to share your content with others Deploy your CSK website This book is for ASP.NET developers with a sound grasp of C# and access to Visual Studio .NET. This book uses the Visual Studio. NET version of the ASP.NET Community Starter Kit available from http://www.asp.net/StarterKits/
Table of Contents (16 chapters)
TrixBox Made Easy
Credits
About the Authors
Introduction
CSK Controls

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...