Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by louisstephens

  1. Thanks again Kongondo! I finally figured out a way to do this (might not be the best). <?php $urlGrab = explode( '/', $page->url);echo $urlGrab[2]; $newHeader = $urlGrab[2]; switch ($newHeader) { case "whale": include( './inc/headerImage.inc'); break; case "guppie": include( './inc/headerImage2.inc'); break; default: include( './inc/headerImage.inc'); } ?> Is there a better way to create the desired effect?
  2. Thanks kongondo! I am falling in love with process wire ( long time user of Wordpress). I was kind of hoping to keep one or two templates to use and just switch the header ( as they will all use the same fields etc etc and the number there will potentially be 25 different versions of one template header) I am sorry, I should have clarified in my original post.
  3. So I have set up a pretty basic template for pages using: <?php include('header.inc'); ?> and page structure is something like mydomain.com/whales/page-name I was hoping to have a different header.inc for every group of pages (so based on the parent page include the relevant header.inc). For example, /whales/ would have a different header than /goldfish/ (sorry for the silly examples). However, I can not for the life of me find a solution, nor am I having any luck in creating the desired outcome. Has anyone done anything like this before? Am I approaching this is the wrong way?
  • Create New...