The newsbox() Function

Probably, the newsbox() function is the most underestimated CMSimple function. Originally, it was thought to provide the CMSimple user with the possibility to write some text with or without images and show it inside the newsbox on every CMSimple page. Hereby, the newsbox() function is added to the template.htm file maybe below the menu or in a third column of a specific layout.

<?php echo newsbox('News'); ?>

A hidden page called “News” will then be shown in the newsbox window. A description of how it is installed can be found at cmsimple.dk.

However, as soon as a variable is added to the function, it becomes very sexy.

<?php echo newsbox($news); ?>

Now, it is possible to add text or images or both to a page only under specific conditions. This opens up a variety of alternatives to deploy the newsbox function. Hereby, it mainly follows the CMSimple script code:

<?php if ($news==''){echo newsbox('mainNews');}else{echo newsbox($news);} ?>

Tips & Tricks

tips_and_tricks/newsbox/start.txt · Last modified: 2008/01/13 13:02 by till