X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   how to show a limitet number of links in a menu? (https://forum.x-cart.com/showthread.php?t=34168)

wiggywag 09-26-2007 05:53 AM

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

xray2 09-29-2007 07:46 PM

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}


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.