Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Total noob needs a little help with CMS!!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Frameworks
View previous topic :: View next topic  
Author Message
MightyMouse
Smarty n00b


Joined: 26 Oct 2007
Posts: 2

PostPosted: Fri Oct 26, 2007 12:40 am    Post subject: Total noob needs a little help with CMS!! Reply with quote

Hi All, new to the forum and sorta new to smarty (I can do basic customization, but thats about it...). I hope I am posting to the right category

Im currently customizing a CMS Site (using CMS Made Simple) for a client...normally I can muddle my way through PHP, but I'm stumped in this particular case.

I want to be able to load a different banner based on the page name (i.e. home page would load banner.jpg, index.php?page=About page would load banner2.jpg, etc...). I'm not sure how to capture the var, but if my assumption is right, this is the smarty conditional I would use once I have captured the right var:

{if $var eq 'some value}
etc...

I tried doing it with sessions and cookies, but I probably didn't do it right. I assume once I am able to do this, I would be able to do the same thing to change the content of the sidebar - because we don't want the news or search option to show up on every page, but instead some static content.

Can someone please point me in the right direction? Thank you!
Back to top
View user's profile Send private message
MightyMouse
Smarty n00b


Joined: 26 Oct 2007
Posts: 2

PostPosted: Fri Oct 26, 2007 4:37 am    Post subject: Reply with quote

Please disregard my post - I have since found the answer to my question.

I used {debug} to find out the variable for what I wanted to do, and used that for my conditional statement. In this case is was $content_id. Works like a charm!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Frameworks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP