Results 1 to 3 of 3

Thread: Custom Layout Section

  1. #1
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Custom Layout Section

    I am already using a custom layout , having already created two additional colums within the main column.

    Now I need to create another full width section, underneath the header {but not in it). It needs to be inside the container div but above the #left and #main divs.

    I have this in fe_page.tpl

    Code:
    		<div id="container">
    
    			<?php echo $this->sections ['Top']; ?>
    
    			<?php if ($this->left): ?>
    
    			<div id="left">
    Top is my new section.

    The problem is I already have custom layout sections defined, inside the main column.

    There does not seem to be a way to define another in another position.

    Therefore my content is showing in 2 places.

    To see the problem:

    http://www.sme-web-design.com/

    Any ideas how I can overcome this?

  2. #2
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Custom Layout Section

    Hi Gary,

    First I'd remove these three lines from your fe_page.tpl file. This will prevent any duplicate content, and also it will render the "custom sections position" select box useless:

    Code:
    <?php echo $this->getCustomSections('before'); ?>
    <?php echo $this->getCustomSections('main'); ?>
    <?php echo $this->getCustomSections('after'); ?>
    Once that's done you can insert the following code anywhere in the fe_page.tpl file as many times as you want for each of the custom layout sections you want to add:

    Code:
    <?php if ($this->sections['My Layout Section']): ?>
    	<div id="my-layout-section">
    		<?php echo $this->sections['My Layout Section']; ?>
    	</div>
    <?php endif; ?>
    Brian

  3. #3
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Custom Layout Section

    Thanks Brian - You are making a habit of coming to my rescue, I was really stuck there!!

    Cheers m8.

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
  •