Results 1 to 3 of 3

Thread: Putting Custom layout section above rest of page

  1. #1
    User
    Join Date
    06-30-09.
    Posts
    37

    Default Putting Custom layout section above rest of page

    Hi,

    I am trying to add a custom layout section above the header of my pages to hold a banner ad. I added the line
    Code:
    <?php echo $this->getCustomSections('top'); ?>
    to my template, and added the template name 'top' in the settings module. In the page layout editor, however, there is not option to place a custom section above the header -- only below the header, in the main body, or before the footer. How can I place this section where I need it to go?

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    41

    Default Re: Putting Custom layout section above rest of page

    Hi etsauer,
    you're right, placing sections before the header is 'officially' not supported.

    Here's a workaround:
    Simply ignore the positioning in Layout > Pagelayouts. If you wanted to you could even choose "Before footer" under position of custom layouts and place your banner module at the very bottom of the module list (of course use 'top' as column for it). Then go into your template and place your section before the header. You already did that, only that a direct call to a custom section has to look like this:
    Code:
    <?php if ($this->sections['top']): ?>
    <?php*echo*$this->sections['top'];*?>
    <?php endif; ?>
    That'basically it. Two additional points:

    1.Why do you need a custom section for this?

    2. You know there's a banner extension?


    cheers
    Antipitch

  3. #3
    User
    Join Date
    06-30-09.
    Posts
    37

    Default Re: Putting Custom layout section above rest of page

    Thanks, this worked great, except I also had to remove the getCustomSections('before') function call to prevent the banner from showing up twice.

    I just wanted a custom section for personal organizational purposes. I realize there are ways of putting this in the header.

    And yes I am using the banner module.

    Also, here is my new site (still in production and without permanent url): http://soccertraderumors.morseave.com

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
  •