Sunday, May 19 in 2024
Module Frontpage Slideshow
Modul: GlobalBlocks
Author: Dev4me
Nick: Ruud
Version: 1.0.0
State: Stable
License: GPL
Platform: 2.8
Last info: 2013-06-17
428 votes
1 2 3 4 5
Download: here
Forum: here
Web Link: here
Description: A much heard question in the WebsiteBaker forum is: How do I include some fixed content on every page.
Over time, many solutions have been given where typically you need to include and alter some php code to fetch the content and some instructions to add optional frontend.css/.js in your template.

Now you can use the globalBlocks snippet.

The snippet is installed as standard module in WebsiteBaker, and is to be used in your template with just a simple onliner to add any section to the output.

The basic example is:

code 1 <?php globalBlock ( 123 ); ?>
This will add section 123 in the output on the same location as the functioncall was written.

Other optional parameters are:

1. Use frontend.css and/or frontend.js of the linked section. (Default: true)
2. Buffer the generated content or output directly (Default: false = direct output)
3. One or more page_id's (as comma seperated list) of the pages the content should be included. (Default: all pages)

An example using buffered output that is only shown on pages 8,12,25 and 52 is:

code 1 <?php $buffer = globalBlock ( 123 , true, true, "8,12,25,52" ); ?>
The $buffer result variable now can be used on one or more locations by using <?php echo $buffer; ?>

More examples can be found in the included README file.