Glossary Item Box

Navigator Control

Adding Custom Catalog Pages

Structured Solutions

This document describes one of the techniques you can use to change which items are shown on the Navigator Control menu.

Normally the Navigator Control will create a link to the SearchResults.aspx page for each item in the menu. For example, if the category id of the first item is 6, then the Navigator Control will create a link to "SearchResults.aspx?CategoryID=6". This will display a normal StoreFront catalog page.

Using Custom Catalogs, you can override this standard link with your own. For example, if you have created a special page that highlights all the new hats that are available this season, you may want to display that page instead of the standard StoreFront catalog. To do this, you just add a simple tag to the Navigator Control that tells it to use your special page instead of the regular one. If the special page is NewHats.htm and the category for hats is 6, then you would add this tag:

<Catalog CategoryID="6" Url="NewHats.aspx">

You can add as many of these as you want. The Navigator Control will still select the item in the menu and expand it to show sub-categories.

One way this can be useful is to add "static" pages such as Contacts or Terms and Conditions. To do this, you would create a category in StoreFront for each static page. Then you would add a <Catalog> tag for each one pointing to the actual page. This is shown in the example below.

Example

In this walk through, we will modify the TextNavigator1.ascx user control to display an "About Us" link in the menu..

  1. Create a page named AboutUs.htm (it can be AboutUs.aspx, or any other valid page type).
  2. Using the StoreFront merchant tools, create a top-level category with the name "About Us".
  3. Find the id of the new "About Us" category by using the StoreFront client tools to insert a dynamic link to this category. After you get the id, you can delete the link.
  4. Open Controls/TextNavigator1.ascx in an editor and add the CheckProducts="False" parameter to the <sfaddons:Navigator> tag as shown in red (there may be other parameters in the tag that are not shown here). This will force the Navigator Control to display all categories, even if they do not have any products assigned to them (About Us does not have any products).
    <sfaddons:Navigator id="Navigator1" runat="server"
       CheckProducts="False">
  5. Add a <Catalog> tag inside the Navigator Control as shown in red below. You will use the id that you discovered in step 2 above.
    <sfaddons:Navigator id="Navigator1"runat="server" CheckProducts="False"> 
       ... other tags ...
       <Catalog CategoryID="x" Url="AboutUs.htm" />
    </sfaddons:Navigator>
  6. Save your changes and close the file.
  7. Copy TextNavigator1.ascx to the ssl/Controls directory.

Open a page of your store in a browser, select the About Us item and notice that AboutUs.htm is displayed.

 

 


Copyright © 2005 by Structured Solutions. All rights reserved.

Version 1.3.2