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 select specific static pages to appear in menu? (https://forum.x-cart.com/showthread.php?t=39546)

pepperlibido 05-04-2008 06:09 PM

How to select specific static pages to appear in menu?
 
Please advise how to select specific static pages to appear in my side menu e.g. help menu.

In my pages_menu.tpl file I have the following: -

{if $pages_menu[pg].orderby > 300}

What do I need to change so that I may select specific pages rather than a range of pages?

Most likely a dumb question but I▓m not smart(y) enough to solve it.

Thanks in advance for any help.

Yurij 05-05-2008 06:46 AM

Re: How to select specific static pages to appear in menu?
 
Quote:

Originally Posted by pepperlibido
Please advise how to select specific static pages to appear in my side menu e.g. help menu.

In my pages_menue.tpl file I have the following: -

{if $pages_menu[pg].orderby > 300}

What do I need to change so that I may select specific pages rather than a range of pages?

Most likely a dumb question but I▓m not smart(y) enough to solve it.

Thanks in advance for any help.


PHP Code:

{if $pages_menu[pg].pageid eq 1 or $pages_menu[pg].pageid eq 12 or $pages_menu[pg].pageid eq 15}
.......... 

where "1, 12, 15...." id page number

pepperlibido 05-05-2008 05:47 PM

Re: How to select specific static pages to appear in menu?
 
Thanks Yurij

When we apply the code we get a blank. That is, non of the pages are listed in the menu.

The following is the entire code after adding your suggestion for pages_menu.tpl




PHP Code:

{* $Idpages_menu.tpl,v 1.5 2005/11/17 06:55:36 max Exp $ *}
{
section name=pg loop=$pages_menu}


{if 
$pages_menu[pg].pageid eq 170 or $pages_menu[pg].pageid eq 180 or $pages_menu[pg].pageid eq 190}


{* 
WCM CDSEO Links - Static Pages *}<a href="{$http_location}/{$cdseo_pages}/{$pages_menu[pg].filename}class="VertMenuItems" title="{$pages_menu[pg].title}">{* / WCM CDSEO Links - Static Pages *}{$pages_menu[pg].title}</a><br />
{/if}
{/
section


170, 180, 190 being the positions of the static pages I wish to add to the menu.

Did I do it as you intended? Otherwise any other ideas much appreciated.

Yurij 05-07-2008 12:01 AM

Re: How to select specific static pages to appear in menu?
 
Quote:

Originally Posted by pepperlibido
Thanks Yurij

When we apply the code we get a blank. That is, non of the pages are listed in the menu.

The following is the entire code after adding your suggestion for pages_menu.tpl




PHP Code:

{* $Idpages_menu.tpl,v 1.5 2005/11/17 06:55:36 max Exp $ *}
{
section name=pg loop=$pages_menu}


{if 
$pages_menu[pg].pageid eq 170 or $pages_menu[pg].pageid eq 180 or $pages_menu[pg].pageid eq 190}


{* 
WCM CDSEO Links - Static Pages *}<a href="{$http_location}/{$cdseo_pages}/{$pages_menu[pg].filename}class="VertMenuItems" title="{$pages_menu[pg].title}">{* / WCM CDSEO Links - Static Pages *}{$pages_menu[pg].title}</a><br />
{/if}
{/
section


170, 180, 190 being the positions of the static pages I wish to add to the menu.

Did I do it as you intended? Otherwise any other ideas much appreciated.


If you use position (filled orderby) 170, 180, 190,
then use next code:
PHP Code:

{section name=pg loop=$pages_menu}


{if 
$pages_menu[pg].orderby eq 170 or $pages_menu[pg].orderby eq 180 or $pages_menu[pg].orderby eq 190}


{* 
WCM CDSEO Links - Static Pages *}<a href="{$http_location}/{$cdseo_pages}/{$pages_menu[pg].filename}class="VertMenuItems" title="{$pages_menu[pg].title}">{* / WCM CDSEO Links - Static Pages *}{$pages_menu[pg].title}</a><br />
{/if}
{/
section


pepperlibido 05-07-2008 04:28 PM

Re: How to select specific static pages to appear in menu?
 
Thanks Yurji,

It worked a treat.


All times are GMT -8. The time now is 03:21 PM.

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