Hi,
I would like to be able to check for which page drupal is on in my site. Basic the structure of the code is like this
if (page is equal to front) {
do this
} else if (page is equal to groups) {
do this
} else if (page is equal to events) {
do this
} else {
then do this
}
I would put this function in my template page and call it from my page.tpl.php page. I would like to pass the page to the function to run the check to return the information for printing on the page.tpl.php. Basically I would like to be able to have Drupal know which page it is on and print different information for that page in a box though code.
Might be better in a select statement but you get my point. Thanks for any help.
Comments
if you're using a
if you're using a phptemplate based theme you have "$is_front" available in page.tpl.php. To test for groups and/or events, you'd probably have to check the $node->type.
The logic might look like:
Untested-- just a guess.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
Hi Worldfallz
Thanks for your help I will give this a try and post back.
My Code for this
This is what I did, don't know if it is the best way to do this.
I run this function in the page tpl to show the icons for the pages that I would like them to show up on. otherwize no popup icon on that page.
I run this function in my div for hidden javascript box this places the different content in each of the pop up boxes for each different page. This is on my template page.
This is for Drupal 5.x