[#6734] active=true/false

Created By: franck delaunay (newvto)
Date Submitted: 2011-08-03 07:57

Assigned To: Georg Busch (nan)
Resolution: None
State: Open
Detailed Description:
When you use "active=false" for a field in your template, the field is hidden in
backend and front-end.
Each new content block created in the template should be simply turn off (by
checking a yes/no case for example)  in the back-end,only for the front-end (you
can edit/modify the content block in the back-end, but this block is hidden in
the front-end).


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?


{content block="show_content" block_type="checkbox" default=1
assign="show_content" label="Show content?"}
{content assign="content"}
{if $show_content}

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

Updated: 2011-08-04 05:58
resolution_id: => 5