Difference between revisions of "Displaying a content page at the same level as top category"

From AbleCommerce Wiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
'''Scenario'''
 
'''Scenario'''
  
Some times you may need to add some content/information pages and you 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.
+
Some times you may need to add some content/information pages and you wanted them to show up in the left navigation, but couldn't do that unless you put them under a category. The Browse--> Catalog only lets you add categories at that level.
  
 
'''Solution'''
 
'''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:  
+
Copy the webpage.aspx and rename 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>
+
         <code><pre>
 
         <%--
 
         <%--
 
         <DisplayPage>
 
         <DisplayPage>
Line 17: Line 17:
 
         </DisplayPage>
 
         </DisplayPage>
 
         --%>
 
         --%>
        </code>
 
  
        <code>
 
 
         <asp:Content ID="MainContent" ContentPlaceHolderID="PageContent" Runat="Server">
 
         <asp:Content ID="MainContent" ContentPlaceHolderID="PageContent" Runat="Server">
 
         <cb:ScriptletPart ID="CategoryContent" runat="server" Layout="Left Sidebar" Header="Standard  
 
         <cb:ScriptletPart ID="CategoryContent" runat="server" Layout="Left Sidebar" Header="Standard  
Line 25: Line 23:
 
         Title="View Webpage" AllowClose="False" AllowMinimize="false" />
 
         Title="View Webpage" AllowClose="False" AllowMinimize="false" />
 
         </asp:Content>
 
         </asp:Content>
         </code>
+
         </pre></code>
  
Create a new scriplet and save it in the App_Data/Scriplets/Custom/Content folder. The name  
+
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:
of that scriplet is Category Content.htm. That scriplet has this code:
+
 
          
 
          
         <code>
+
         <code><pre>
 
         <!--
 
         <!--
 
         <Description>
 
         <Description>
Line 38: Line 35:
 
         [[ConLib:CategoryBreadCrumbs HideLastNode="False"]]
 
         [[ConLib:CategoryBreadCrumbs HideLastNode="False"]]
 
         <div class="pageHeader">
 
         <div class="pageHeader">
         <h1 class="heading">$Category.Name</h1>
+
         <h1 class="heading">
 +
        $Category.Name
 +
        </h1>
 
         </div>
 
         </div>
        </code>
 
 
 
         $Category.Description
 
         $Category.Description
 +
        </pre></code>
 +
       
 +
 +
If you want to make a content page so that it will show up at the top level of the left navigation, Create a category and select the above for the display page in the category edit screen and add your content to the description field.
 +
 +
==Reference==
 +
Originally posted in forums by Judy http://forums.ablecommerce.com/viewtopic.php?f=47&t=6730
  
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.
+
[[Category:AbleCommerce 7]]

Latest revision as of 11:26, 15 August 2013

Scenario

Some times you may need to add some content/information pages and you wanted them to show up in the left navigation, but couldn't do that unless you put them under a category. The Browse--> Catalog only lets you add categories at that level.

Solution

Copy the webpage.aspx and rename it categorycontent.aspx. Keep it in the same location as the webpage.aspx. Replace the corresponding sections from webpage.aspx in the categorycontent.aspx:


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

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

        <!--
        <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 navigation, Create a category and select the above for the display page in the category edit screen and add your content to the description field.

Reference

Originally posted in forums by Judy http://forums.ablecommerce.com/viewtopic.php?f=47&t=6730