Displaying a content page at the same level as top category

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Displaying a content page at the same level as top category

Post by jmestep » Mon Mar 10, 2008 7:08 am

Problem:
Client wanted to add some content/ information pages and he wanted them to show up in the left nav, but couldn't do that unless he put them under a category-- the Browse--> Catalog only lets you add categories at that level.
Solution:
Copy the webpage.aspx and renamed it categorycontent.aspx. Keep it in the same location as the webpage.aspx .Replace the corresponding sections from webpage.aspx in the categorycontent.aspx:

Code: Select all

<%-- 
<DisplayPage>
    <Name>Category Content</Name>
    <NodeType>Category</NodeType>
    <Description>A basic display handler for category content so that the links show up in the left nav.  It shows the category content with standard headers and footers.</Description>
</DisplayPage>
--%>

Code: Select all

<asp:Content ID="MainContent" ContentPlaceHolderID="PageContent" Runat="Server">
    <cb:ScriptletPart ID="CategoryContent" runat="server" Layout="Left Sidebar" Header="Standard Header" Content="Category Content" Sidebar="Standard Sidebar 1" Footer="Standard Footer" Title="View Webpage" AllowClose="False" AllowMinimize="false" />
</asp:Content>
Create a new scriplet and save it in the App_Data/Scriplets/Custom/Content folder. The name of that scriplet is Category Content.htm. That scriplet has this code:

Code: Select all

<!--
<Description>
Displays the contents of a category content catalog object.
</Description>
-->
[[ConLib:CategoryBreadCrumbs HideLastNode="False"]]
<div class="pageHeader">
<h1 class="heading">$Category.Name</h1>
</div>

$Category.Description
If you want to make a content page so that it will show up at the top level of the left nav, Create a category and select the above for the display page in the category edit screen and add your content to the description field.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply