| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Discriminating Against Static Pages | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I have a quick question.
I have created two different templates. One designs my embedded static pages and another designs my root level static pages. The difference is that one has a left-side menu and the other one doesn't. How do I create a code (and where do I place it) that says something like: -------- If this is an embedded page, use customer/home1.tpl. If this is a root level page, use customer/home.tpl. ------ As always, I appreciate it. ![]() |
|||||||
#2
|
|||||||
|
|||||||
![]() Let me rephrase that. I just realized that my root level pages don't contain any of my home.tpl design but it's just the HTML entirely.
Out of my embedded pages only, how do I tell for each page individually to call either the home.tpl or home1.tpl design? I'm guessing that I will have to redesign each page individually with its own template, but I hope there's an easier way around it. |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Open pages.php
FIND: func_display("customer/home.tpl",$smarty); REPLACE WITH SOMETHING SUCH AS: if ($pageid == "X") { func_display("customer/home1.tpl",$smarty); } elseif ($pageid == "X") { func_display("customer/home2.tpl",$smarty); } else { func_display("customer/home.tpl",$smarty); } Replace "X" with the numeric pageid. |
|||||||||
#4
|
|||||||
|
|||||||
![]() That code works beautifully but the trouble is that I have several pages and the script works only for one page at a time. What if I wanted a list with something like
if ($pageid == "190", "191", "195", "203") { ? How can that be done without parse errors? I tried looking in the the Smarty manual for examples but it seems like commas and quotation marks is what's being used so I'm a bit confused. Thanks. |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Code:
|
|||||||||
|
|||
X-Cart forums © 2001-2020
|