I am trying to have different banners on each page.

in page.tpl.php i was trying this code, Am i on the wrong path or is there a completely diff way I should be doing this?

if($key == "page2") { Page2
} else { Other page }

Thanks in advance

Comments

drskitzo’s picture

Assigned: drskitzo » Unassigned
irakli’s picture

Status: Active » Fixed

Not sure if this has anything to do with CustomPage per se (I'd guess - no), but as a general comment you check the URL parts by looking checking them with arg([index]) function, not with a $key variable. That variable does not seem to be defined in your code.

Hope this helps.

Irakli

drskitzo’s picture

can you be kind enough to give me an example of how I'd use the arg([index]) function for my purposes? :)

Is there a way I can get the $key defined in my code? Is there a file I need to include or whatnot?

Thanks in advance! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.