Results 1 to 3 of 3

Thread: [solved] How to know if certain page is open

  1. #1
    New user
    Join Date
    02-17-10.
    Location
    Stockholm
    Posts
    7

    Default [solved] How to know if certain page is open

    Is is possible to get to know if certain page is open (for example root, about) and by using if this page is root clause, then I would add extra blocks to my fe_page template.
    Code:
    <?php if ($this-> Page is Root): ?>
       <div id="banner">
       </div>           
    <?php endif; ?>
    I know that it is possible to create different layouts for different pages and then assign different fe_page layouts, but it would save me time and I can assign everything in one fe_page layout page.

    Thank you in advance.
    Last edited by waidis; 01/13/2015 at 13:39. Reason: solved

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    You can use this extension to easily handle different page wide content on hand selected pages.
    https://contao.org/extension-list/view/boxes.html
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  3. #3
    New user
    Join Date
    02-17-10.
    Location
    Stockholm
    Posts
    7

    Default

    Andreas, thank you for advice. That helped to find a solution.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •