[solved]change header image per page

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
De_Charel
New Member
New Member
Posts: 5
Joined: Fri Sep 04, 2009 9:16 pm

[solved]change header image per page

Post by De_Charel »

Hi

I successfully installed CMSMS 1.6.4, the installation works like a charm.

I wondered if there was a way to change the header image from page to page, per category an image would be nice, with the possibility of setting a default or random image. I searched the net, but couldn't find such a feature.

Maybe you can give me a few suggestions how to get this done?
Thanks!

Greets Charel
Last edited by De_Charel on Mon Sep 07, 2009 2:27 pm, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: change header image per page

Post by jmcgin51 »

how about by page_alias?

{if $page_alias eq 'page1'}

{elseif $page_alias eq 'page2'}

{else}

{/if}

This is just a simple example.  There are many other ways to do things like this, including a plugin to randomly rotate images.  Check the Forge.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: change header image per page

Post by calguy1000 »

This has been discussed numerous times... There are multiple ways to do this in CMSMS depending upon your needs.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Andiministrator

Re: change header image per page

Post by Andiministrator »

If the functionality of random image is not that important, have a look on my ImageList Plugin: http://dev.cmsmadesimple.org/projects/imagelist.
User avatar
seensite
Forum Members
Forum Members
Posts: 173
Joined: Sun Feb 10, 2008 7:36 pm

Re: change header image per page

Post by seensite »

... ... ... and there is the Banners'module which do that too, especially you can categorize your images. There's no content yet, but header uses Banners : http://www.centpourcent.ch/
The universe of information technology is constantly growing and contains only emerging products built on successive patches
De_Charel
New Member
New Member
Posts: 5
Joined: Fri Sep 04, 2009 9:16 pm

Re: [solved]change header image per page

Post by De_Charel »

Thx for the fast and nice replies.

I fixed it with this kind of code in the template, which works fine.
{if $page_alias eq 'page1'}

{elseif $page_alias eq 'page2'}

{else}

{/if}

Kind regards
Charel
Post Reply

Return to “CMSMS Core”