![]() |
|
Function to detect home page? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: Function to detect home page? (/thread-7800.html) |
Function to detect home page? - amucklow - 03-11-2010 I've checked the function reference, but can't find anything that lets me write a conditional statement in e.g. header.php as follows:
Thanks Function to detect home page? - acrylian - 03-11-2010 Well, each theme has a index.php file always... You can use the global variable In general you have to use the object model to differ album, image or Zenpage page/news contexts. Zenpage items however have See the user guide about a tutorial for that. I assume you have read the theming tutorial already. Function to detect home page? - amucklow - 03-11-2010 Thanks acrylian. Also - is there any way to distinguish between index.php and a separate home page like index-gallery.php? I have index.php for my 'splash' page and index-gallery.php for my album overview - but I could get into finding a string in the URL but that's a bit messier. Function to detect home page? - micheall - 04-11-2010 I assume you've set the gallery index page via options to be the index-gallery.php? Function to detect home page? - amucklow - 10-11-2010 For the record, here's my solution. To recap, I have a home/splash page ( In Zenphoto, the So: ` $gallery = strpos(curPageURL(), 'gallery'); ?> Function to detect home page? - acrylian - 10-11-2010 I see you call In this case it is a normal custom page and should like like one. Btw, you are running on the older 1.3 release. The 1.3.1.x release were security bug fix releases and we strongly recommend to upgrade. PS: Nice site. You should submit to the showcase. Small suggestion: I would implement mousewheel support for the thumbs (I see it is loaded actually but in Firefox & Safari 4.1.2 it does not work): Function to detect home page? - amucklow - 10-11-2010 Thanks.
` Function to detect home page? - acrylian - 11-11-2010 Well, then I guess you are doing something different. If the page is named "gallery-index.php" why are you able to check for "gallery"? |