Jump to content

Recommended Posts

Posted

Hi there,

I have a banner in my website structure below my navigation bar. Since I wanted to display it on all of the pages, I have defined it in layout.tpl like this...

  <div id="banner"></div>

 <div class="boxmain">
  <?php
  /* This will insert all of the "meat" of the page in there - the template
   which is generated, depending on which page you're on. To change these
   templates, check out the docs on the site. They're under the /core/templates
   folder, and to change them, copy them into the folder of your skin (the
   folder this file is in right now.
   */

  echo $page_content;
  ?>

 </div>

'boxmain' class is my main page content. However, on one of the templates I want to be able to remove the banner outside of the template. Is that possible or would I have to do it the normal way, by defining a banner inside 'boxmain' on all of the templates, one by one?

Posted

<?php if($page_title != "About Us - Airline Name"){?>
<div id="banner"></div>
<?php } ?>
  <div class="boxmain">
   <?php echo $page_content;?>
</div>

That's how I'd personally do it, there maybe a better way of doing it though.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...