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

Multiple blocks in a template?

(1/2) > >>

xyloweb:
I have read this page:
http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/creating-a-wb-template.php

It shows what you do in the info.php page to get multiple blocks, like this:
// definitions for multiple blocks (required if more than one block is used)
$block[1]   = 'Main content';
$block[2]   = 'News';
But what do you do in the index.php page?
I have seen this code: <?php page_content(); ?>
...so I'm guessing the answer uses something like this, but I can't find an example of what code you should use in index.php.

BerndJM:
Hi,

just have a look on the "next" page in the help section "Designer Guide":
http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/content-blocks.php
It's called "Content Blocks" ... nice isn't it :lol:

Regards Bernd

xyloweb:
Thanks, I didn't see the 'next' link at the top of the page (I normally see them at the bottom).

Another related question: Is it possible to have a block of text that appears globally on all pages (e.g. the same on every page), and allow the client to be able to change that text with the web interface, rather than me having to change the template?

BerndJM:
Hi,

for "global blocks" please use the forum search there is a smple solution from user "pcwacht"

Regards Bernd

johnp:

--- Quote ---// definitions for multiple blocks (required if more than one block is used)
$block[1]   = 'Main content';
$block[2]   = 'News';
--- End quote ---


--- Quote ---But what do you do in the index.php page?
I have seen this code:

<?php page_content(); ?>
--- End quote ---

<?php page_content(1); ?>// Reflects Main Content
<?php page_content(2); ?>// Reflects News

And so on just add a new $block[ ] and reflect it in <?php page_content(); ?> located some where on your template
To call the block up on a current or new page just do the following...

goto current or new page
click on Manage Sections
select your block under Add Section click save and return to editing your page..

JohnP

Navigation

[0] Message Index

[#] Next page

Go to full version