![]() |
Discriminating Against Static Pages
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. :oops: |
Re: Discriminating Against Static Pages
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. |
Re: Discriminating Against Static Pages
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. |
Re: Discriminating Against Static Pages
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. |
Re: Discriminating Against Static Pages
Code:
if ($pageid == "190" OR $pageid == "191" OR $pageid == "195" OR $pageid == "203") { |
All times are GMT -8. The time now is 11:15 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.