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 get help pages under help box (https://forum.x-cart.com/showthread.php?t=9989)

pmstudios 10-25-2004 01:48 AM

Hi Gijs,

You could merge both if statements togther since the content within each is the same:

Code:

<table width="100%">
<tr>
<td align="center"><h1>{$lng.lbl_tab_how_to}</h1></td>
</tr>
<tr>
<td>{$lng.lbl_how_to_text}


</td>
</tr>
</table>


{if $store_language eq "NL" or $store_language eq "US"}

{capture name=dialog}
{section name=pg loop=$pages_menu}
{if $pages_menu[pg].pageid ne "1"}
{$pages_menu[pg].title}

{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_tab_how_to content=$smarty.capture.dialog extra="width=100%"}

{/if}


Gijs 10-25-2004 03:53 AM

hi pmstudios,

Made a mistake in my code

US should be "2" as page_id is an auto-increment field
Code:

{if $pages_menu[pg].pageid ne "2"}

So I guess putting them together is out of the question ?

Thanks,

Gijs

pmstudios 10-25-2004 04:11 AM

Hey Gijs,

Try this then...

Code:

{if $store_language eq "NL" or $store_language eq "US"}

{capture name=dialog}
{section name=pg loop=$pages_menu}
{if $pages_menu[pg].pageid ne "1" or ($store_language eq "US" and $pages_menu[pg].pageid ne "2")}
{$pages_menu[pg].title}

{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_tab_how_to content=$smarty.capture.dialog extra="width=100%"}

{/if}


Gijs 10-25-2004 06:00 AM

Hi pmstudios,

This doesn't work as in the US-language it shows the file with pageid=2.

But again, you've pointed me in the right direction 8)

This 'll do the trick:
Code:

{if $store_language eq "NL" or $store_language eq "US"}
{capture name=dialog}
{section name=pg loop=$pages_menu}
{if $pages_menu[pg].pageid ne "1" and $pages_menu[pg].pageid ne "2"}
{$pages_menu[pg].title}
 
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_tab_how_to content=$smarty.capture.dialog extra="width=100%"}
{/if}


Thanks,

Gijs

pmstudios 10-25-2004 06:08 AM

Ah, I see. I was confused as to what you were wanting to display.

Glad you got it 8)


All times are GMT -8. The time now is 09:49 AM.

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