| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
PhilJ's Advanced Speedbar - Smarty question re: id="current" - $main eq "X" | ||||
|
|
Thread Tools |
#11
|
|||||||
|
|||||||
Re: PhilJ's Advanced Speedbar - Smarty question re: id="current" - $main eq "X"
Quote:
wow that helps me out a ton... thanks
__________________
X-Cart Gold v4.1.9 |
|||||||
#12
|
|||||||||
|
|||||||||
Re: PhilJ's Advanced Speedbar - Smarty question re: id="current" - $main eq "X"
One way you can assign things is to set anew variable in the php files.
There are not too many main php files that control everything else. In the bottom of your php file add something like this Code:
now in your template use this Code:
Its basically just allowing you to assign your own variable instead of using the built in {$main} one that xcart uses
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#13
|
|||||||
|
|||||||
Re: PhilJ's Advanced Speedbar - Smarty question re: id="current" - $main eq "X"
Shan,
I almost get it... So in my case, the static embedded pages are all related to what was pages.php (now for me, due to CDSEO, help.php) So in the php fie. I would add the line, $smarty->assign("sub", "my_page_name"); I could call "sub" anything I want, yes? What about "my_page_name" ? Does this have to match something in my static page? Do I add a line to the static page that tells smarty its page name? And finally, I would do this for EACH page, yes? Thanks! Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#14
|
|||||||||
|
|||||||||
Re: PhilJ's Advanced Speedbar - Smarty question re: id="current" - $main eq "X"
hi,
sub is the name of the variable i chose my_page_name is what we assign to that variable I was making a css nav menu and wanted to show what section i was currently in. eg help / products / checkout etc so in help.php i would add assign sub to help etc. this just allowed me to know what area of the site i was on as well as already having the value of {$main} if I needed to help.php - deals with help type stuff products.php & product.php dealt with most of the shop side of things cart.php was mainly the checkout stuff and so on
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
|
|||
X-Cart forums © 2001-2020
|