WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: mgeene on July 25, 2016, 11:14:26 AM

Title: multiple page_content sections
Post by: mgeene on July 25, 2016, 11:14:26 AM
I have a responsive template where i want to add multiple page_content sections.
I have several page_content sections assigned to columns in the template, for example, full width, six columns width, four columns width, etc.
Now i have specified this in my template but i notice that when i add 2 same sections on a page, for example, full width, this move in 1 div and not in 2 different divs, so i can not change the position on the section page.

I used this code in the head:
Code: [Select]
<?php 
ob_start();
page_content(1);
$page_content_1 ''.ob_get_contents();
ob_end_clean();

if(defined('tekst_volledige_breedte') AND TEKST_VOLLEDIGE_BREEDTE-!= '') { 
$page_content_1 TEKST_VOLLEDIGE_BREEDTE-1
} else {
ob_start();
        
page_content(1);
        
$page_content_1 ''.ob_get_contents();
        
ob_end_clean();
    
}
?>



I use this code in the template:
Code: [Select]
<?php if(($page_content_1) == true){ ?>
 <div class="aligncenter">
<?php ?>
<?php echo $page_content_1?>
</div>

Does anyone know the solution here or what could be the problem?

Thanks for your reply!
Title: Re: multiple page_content sections
Post by: dbs on July 25, 2016, 11:25:00 AM
Hello, look here: http://wbhelp.org/tips-and-tricks/2014/multiple-columns-in-a-template/
Hope it helps.
Title: Re: multiple page_content sections
Post by: mgeene on August 01, 2016, 11:19:58 AM
Hello,

Thanks this works verry fine and it's simple to work with.