WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Design for additional page content

(1/1)

richwingerter:
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: ---<div>
   <?php echo $page_contentMain; ?>
</div>
--- End code ---

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: ---<div>
   [[LoginBox]]
</div>
--- End code ---

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).

Ruud:
have a look here:
http://wbhelp.org/tips-and-tricks/2014/multiple-columns-in-a-template/

Maybe it helps a bit.

richwingerter:
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.

richwingerter:
Thanks for the link, Ruud. I think that will help!

Navigation

[0] Message Index

Go to full version