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

How to select specific static pages to appear in menu?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-04-2008, 06:09 PM
 
pepperlibido pepperlibido is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: Queensland Australia
Posts: 39
 

Default 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.
__________________
Gerard
Version 4.1.8 Gold
Linux
Server Zeus
Australia
Reply With Quote
  #2  
Old 05-05-2008, 06:46 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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
Reply With Quote
  #3  
Old 05-05-2008, 05:47 PM
 
pepperlibido pepperlibido is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: Queensland Australia
Posts: 39
 

Default 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.
__________________
Gerard
Version 4.1.8 Gold
Linux
Server Zeus
Australia
Reply With Quote
  #4  
Old 05-07-2008, 12:01 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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
Reply With Quote
  #5  
Old 05-07-2008, 04:28 PM
 
pepperlibido pepperlibido is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: Queensland Australia
Posts: 39
 

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

Thanks Yurji,

It worked a treat.
__________________
Gerard
Version 4.1.8 Gold
Linux
Server Zeus
Australia
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 11:49 AM.

   

 
X-Cart forums © 2001-2020