Hi kandi_nyc,
if it is just one announcement similar for all pages you could go with global content blocks. To enable it page wise, you could add a single line content block to the template. If something is entered in this field, the global content block containing your announcement would be shown.
Presuming you have a global content block called "announce_this" containing your announcement.
You could also go for different templates. So if you'd like to turn on the message, you just switch templates (to a template containing the global content block). But if have a few more templates or would like more combinations possible, you end up with a dozend or more templates, which might disturb you or not.
The following code would go into the template where you want your announcement to be shown and creates a new content block which you'll see when you edit a page based on this template. We'll use this page content block as a switch to turn the display of the global content block on and off.
Code: Select all
{content block='show_announcement' assign='show' oneline='true'}
{if !empty($show)}
{global_content name='announce_this'}
{/if}
This code assigns the content of the content block "show_announcement" you have entered in the template to a variable called $show. It then checks if the variable is empty. If it is not, it will display the global content block "announce_this".
It works for me though I don't know if there isn't a more elegant way to do it.
Can anyone tell me if checkboxes are available for enabling more flexible templates?
greetings
nils