Elxis CMS Forum

Support => General => Topic started by: xmanhattan on August 11, 2008, 18:14:28

Title: how to change or rotate intro banner
Post by: xmanhattan on August 11, 2008, 18:14:28
Hello all,

I would like to know how php can determine if it is on the front page or not.

I would like to be able to change banners depending on certain menu area selection
and have setup:
two id's for introbanners in my css file,
an introbanner position in module position of the template manager,
and two introbanner images.

What is the parameter or key word so that I can create the if statement.

e.g. 
Code: [Select]
if mos PageCount??? then oktoheader1
else
oktoheader2

Unless there is another way of doing this?

Assumes that the oktoheader1 and 2 css are the same so that there are no problems with image size and layout.

Petros
Title: Re: how to change or rotate intro banner
Post by: xmanhattan on August 20, 2008, 17:17:48

Anyone?
Title: Re: how to change or rotate intro banner
Post by: datahell on August 22, 2008, 14:21:57
To determine if you are on the front-page you should check the value of the $option global variable.

global $option;
if (($option == 'com_frontpage') || ($option == '')) {
     //you are in front-page
} else {
    //you are not in front-page
}

I did nt get the rest you are talking about.
Title: Re: how to change or rotate intro banner
Post by: xmanhattan on August 23, 2008, 11:39:09
Thank you datahell.

I will work on what you have given me.

Petros