Welcome to Geeklog Saturday, May 18 2013 @ 09:10 AM EDT
Geeklog Themes support the ability to define a different template for different blocks. So your "What's New" block can render differently to your Login block etc. This is done by populating an array called
in a theme's functions.php file. This array is populated with the identifiers for blocks and can set specific block header and footer templates used to format specific blocks to give them a unique look and feel.
The Professional theme that ships with Geeklog prior to 1.5.1 provides logic within functions.php to alter the template for blocks without a specific template assigned to be the left or right block template depending on which side the block has been placed by the site administrator. This changes with Geeklog 1.5.1
In 1.5.1, Geeklog still uses the same method to allow custom templates for block header and footers, however, once it has determined from the
array which template to use, it checks to see whether there is an override to that template for the side the block is on.
For example, if the
value for the
blockfooter-list.thtmlGeeklog will check for
admin_blockis on the left. If those files do not exist, Geeklog will stick with
Geeklog is also intelligent enough that if your theme has already mapped
admin_block to a template that ends in a side (i.e.
blockheader-list-left.thtml then it will not perform this action.
So, it is now much easier for theme developers and site administrators to style their left and right blocks differently even if those blocks are using custom rendering templates. There is however something to note when upgrading a site to Geeklog 1.5.1. Some plugins, such as the Geeklog Forum plugin use
CUSTOM_showBlocks, and this function has changed in 1.5.1, so, when upgrading your site, make sure to copy across
CUSTOM_showBlocks from the
lib-custom.php.dist file to your own
lib-custom.php file. Unless of course you have modified
CUSTOM_showBlocks, in which case you'll need to review and understand the changes in our new function to review them for your site, or you may have some formatting issues with your blocks when running plugins such as the Geeklog Forum Plugin.