Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

how to show a limitet number of links in a menu?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-26-2007, 05:53 AM
 
wiggywag wiggywag is offline
 

Member
  
Join Date: Apr 2005
Posts: 13
 

Default how to show a limitet number of links in a menu?

Hi!

I made a menu showing links to static pages, but I don't want to show all of them only the five last. How do I go about it? Here is my code for that module:

******************************
{* $Id: pages_menu.tpl,v 1.5 2005/11/17 06:55:36 max Exp $ *}
{section name=pg loop=$pages_menu}
{if $pages_menu[pg].pageid ne "6" and $pages_menu[pg].pageid ne "10" and $pages_menu[pg].pageid ne "7"}
<div style="padding-bottom: 2px">{* WebsiteCM CDSEO - START *}<A href="{$http_location}/{$cdseo_pages}/{$pages_menu[pg].filename}" class="VertMenuItems" title="{$pages_menu[pg].title}">{* WebsiteCM CDSEO - END *}{$pages_menu[pg].title|truncate:28:"...":true}</a></div>{/if}
{/section}
******************************

You can see the menu "Artikler" at right:
http://www.caffeclub.no/p/home.php
__________________
wiggywag
X-Cart 4.1.8
Reply With Quote
  #2  
Old 09-29-2007, 07:46 PM
 
xray2 xray2 is offline
 

Member
  
Join Date: Jun 2007
Posts: 20
 

Default Re: how to show a limitet number of links in a menu?

Wiggywag,

This may not be exactly what you are looking for but I use it on my site to hide static / embedded pages that I do not want to appear on the left side nav bar.

I use the static page "POS" column (database 'orderby' field) to set what I want displayed or hidden. Any static page with a POS value less than 5000 is displayed in the navigational menu. Anything with a POS of 5000 or greater is hidden and can only be linked to directly.

This works well if you want to have several products link to a static page containing warranty information while maintaining the look and feel of the store skin but not have extraneous static page links appear in the nav bar.

Hope this helps...

-- X2


/pages_menu.tpl
Quote:
{* $Id: pages_menu.tpl,v 1.5 2005/11/17 06:55:36 max Exp $ *}
{section name=pg loop=$pages_menu}
{if $pages_menu[pg].orderby lt "5000"}
<a href="pages.php?pageid={$pages_menu[pg].pageid}" class="VertMenuItems">{$pages_menu[pg].title}</a><br />
{/if}
{/section}
__________________
4.1.8
X-Cart AOM, Buy Together, Review Approval
CDSEO + Manufacturers + Static Pages
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:56 PM.

   

 
X-Cart forums © 2001-2020