Variable content in theme Variable content in theme
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Variable content in theme

Started by dad6b, December 30, 2004, 05:33:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dad6b

I would like to vary what part of my theme is displayed based on what the user is looking at.  For example, if the user is at the main gallery page I would like a little welcome message but once they enter a specific album that message should go away.

I tried modifying my theme.php file to check if the album variable was set but that didn't seem to work.  Any suggestions?

Nibbler

You can use anycontent.php for this.

dad6b

The part I'm looking to vary is a side bar which has a menu for non-cpg stuff.  I don't think I can do with the anycontent.php.  Is there a way to do this by hacking some of the cpg files?

Nibbler

If it's an html menu that can go in your theme's template.html, otherwise treat it as a custom header/footer.

dad6b

I know I can just put the code for the menu in the template.html file, but how do I control whether or not it should be displayed?

kegobeer

You'll have to modify theme.php to add your side menu, and use an if-then block to determine if it should be displayed.  If you search the forums you will find good posts on how to modify a theme.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots