Limiting displayed top level sections

Search engine friendly UL list type menu for Actinic V8 and V9. Styled by CSS and animated by a small JavaScript.
Post Reply
shoyle
Posts: 7
Joined: Wed Jun 06, 2007 12:39 pm

Limiting displayed top level sections

Post by shoyle »

Hi Norman

Got Norlist working, very pleased with it.

Is there a way I can limit the items that appear at the top level, particularly I want to remove the Best sellers and New Products links.

You can see what I have so far at
test dot hoyles dot com

Thanks
Stephen
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Your "New Products" entry is a normal product section.

It would take a lot of customisation to make NorList omit a particular top-level (or any) section.

The problem is that such a section may / may not have sub-sections and the processing would have to skip them all until a new same-level section was reached (or the end of list if the unwanted section was last).

So I'm afraid the answer is that it's not feasible at the moment.
Norman
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Update. It would be possible to use the Section option Include in Site Map to do this.

It is normally checked by default but unchecking it could omit a Section from the Site Map and NorList.

However you'd also lose the link on the Site Map page and thus make it hard for search engines to find these pages.

To do this, edit layout NorList Dynamic Menu Code and replace

Code: Select all

	<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22NorListDepth%22%20%2f%3e" >
with

Code: Select all

	<actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22NorListDepth%22%20%2f%3e%29%20AND%20%3cactinic%3avariable%20name%3d%22IsSectionIncludedInSiteMap%22%20%2f%3e" >
Norman
shoyle
Posts: 7
Joined: Wed Jun 06, 2007 12:39 pm

Post by shoyle »

That's great, I'm not worried about New Products or Best Sellers not being in the site map as the products will be listed elsewhere anyway.

A slight problem though:
I've added the home page link and brochure links to the menu as per your instructions on a separte post. I added the brochure pages below the product sections rather than above as in your example, this works fine until I exclude the new Products Section from the Site Map, when I do this the brochure links disappear.

Any ideas

thanks
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

I don't see that problem. Here's what I did. In the layout look for

Code: Select all

<actinic:block php="true">
   while ( $thislevel-- > 1 ) echo '</ul></li>';
</actinic:block>
After this add

Code: Select all

<!-- patch to add in Brochure List --> 
<li><a class="menuheader" href="<actinic:variable name="HomePageURL" />" target="_self"><actinic:variable name="HomeText" /></a></li> 
<actinic:block type="BrochurePagesList" > 
   <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%21%3d%201" > 
      <li><a href="<actinic:variable name="BrochurePageURL" />"><actinic:variable name="BrochureName" /></a></li>        
   </actinic:block>    
</actinic:block>
Norman
shoyle
Posts: 7
Joined: Wed Jun 06, 2007 12:39 pm

Post by shoyle »

I had the code just before that rather than after. All sorted now.

Many thanks for your help.

Stephen
Post Reply