eZFlow block: Is there a way to adda checkbox for each block of an ezflow page?

Author Message

Jacobi Jacobi

Thursday 23 September 2010 9:19:35 pm

Is there a way to add a checkbox for each block of an ezflow page? I ask because I would like to be able to check on or off whether to display dates next to headlines of articles if it is checked. The template override could then read this option in and decide whether to display or hide the dates.

Peter Keung

Friday 24 September 2010 8:29:48 am

Answer from Łukasz Serwatka on sdk-public:

"

This is possible but undocumented I'm afraid.

Example configuration is following:

[BlockTypeName]
CustomAttributes[]=my_checkbox
CustomAttributeTypes[my_checkbox]=checkbox

Supported values for CustomAttributeTypes are following: text, checkbox, string. If not defined then string is default value.

For checkbox type GUI will render regular checkbox button with values 0 or 1.

Then in templates you can use it like

{if $block.custom_attributes.my_checkbox|eq('1')}
checked!
{else}
unchecked!
{/if}

Hope this helps!

"

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

tofik sahraoui

Sunday 26 June 2011 4:30:14 pm

Is it possible to add a ezoe editor?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.