Visual signpost in menu

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Visual signpost in menu

Post by tsw »

where would this image be? header, menu, content?

content would be easy, just change the image :)

menu, you could use some css magic

header, might need different template for pages...
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Visual signpost in menu

Post by tsw »

yep, got it.

one way would be making different templates for each menu (just copy the template with new name like my_template_menu1, my_template_menu2 and so on and change images appropiately) then define different layout for pages you want to have different images.

you could also write a user_tag with some php and have it server different image for different pages
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Visual signpost in menu

Post by tsw »

Code: Select all

global $gCms;
$hier = explode(".", $gCms->variables['friendly_position']);
switch ($hier[0]) {
case 1:
   echo '<img src="images/first.jpg" alt="first image" />';
   break;
case 2:
   echo '<img src="images/second.jpg" alt="second image" />';
   break;
case 3:
   echo '<img src="images/third.jpg" alt="third image" />';
   break;
}
save as a new user defined tag
Post Reply

Return to “CMSMS Core”