WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: richwingerter on October 26, 2016, 11:44:40 PM

Title: Design for additional page content
Post by: richwingerter on October 26, 2016, 11:44:40 PM
I have a question about design. I'd like to put some standard content in a second column.

I think I should be able to do this by adding a <div> in the index.php code for my template next to the code for presenting page content. The existing <div> is:

Code: [Select]
<div>
   <?php echo $page_contentMain?>
</div>

It has a class, where I make it the left column.

I added a second column, where I put the login box (like this):

Code: [Select]
<div>
   [[LoginBox]]
</div>

This also has a class that makes it the right column. The login box shows up and works.

I'd like to add standard code after the login box, but I don't want to define it in the template. I'd like to pick it up from a table and display it here.

My design question is: what's the best way to store and get this HTML code? What I'm looking for is something analogous to what WB does with $page_contentMain.

It would help if I could see the definitions of ob_start(), page_content(), and ob_get_clean(), but I don't see them in the files I have.

Does anyone have any advice on how to do this? Thanks for any assistance!

I'm on WB 2.8.3+SP7 (r1646) and MySQL 5.5.52-38.3-log (with charset UTF-8 Unicode).
Title: Re: Design for additional page content
Post by: Ruud on October 26, 2016, 11:52:02 PM
have a look here:
http://wbhelp.org/tips-and-tricks/2014/multiple-columns-in-a-template/

Maybe it helps a bit.
Title: Re: Design for additional page content
Post by: richwingerter on October 27, 2016, 01:42:53 AM
I did get information on ob_get_clean() and similar functions from http://php.net/manual/en/function.ob-get-clean.php. That should help.
Title: Re: Design for additional page content
Post by: richwingerter on October 27, 2016, 01:43:53 AM
Thanks for the link, Ruud. I think that will help!