Date: 2011-08-04 05:58
Posted By: Georg Busch (nan)
Dear Frank,
thanks for your suggestion.
But if you want a checkbox (or whatever works) to toggle a contentblock on/off
for frontend only, why don't you just create such a checkbox yourself in the
same template?
Example:
{content block="show_content" block_type="checkbox" default=1
assign="show_content" label="Show content?"}
{content assign="content"}
{if $show_content}
{$content}
{/if}
So you can define every field you need and you can decide what to do with it in
the frontend.
Date: 2012-02-28 10:22
Posted By: Ludger Merkens (lume)
well I like this idea, but not for the frontend, but for the backend. It would
be nice, if you could enable or disable a block,block_group or page_tab
depending on some condition. (e.g. the value of another block.)
A simple example could be a dropdown 'number of columns' with value 'one',
'two', 'three' and conditional blocks for the second or even third column,
which are only availiable, if the dropdown is switched to two or three.
another example would be a checkbox, "embed google maps into this page", and a
conditional page_tab with address, comment, coordinates etc. which is hidden,
unless you check the checkbox.
Ok in simple cases, you can choose to check against empty content blocks and
still get a reasonable consistend user backend, but hey - it would be a
improvement for the user experience.
A inactive conditional block should always return 'empty' for frontend uses, but
should probably keep its content, in case it gets reactivated.
best regards
Ludger Merkens