Share » Forums » Setup & design » override layout for attributes

override layout for attributes

override layout for attributes

Thursday 26 October 2006 9:06:58 pm - 2 replies

Modified on Thursday 26 October 2006 11:34:53 pm by Matt Brady

Author Message

Daniele Nocentini

Tuesday 31 October 2006 2:39:23 am

maybe you must override only text attribute datatype template instead edit.tpl, try to override this:

standard\templates\content\datatype\edit\eztext.tpl for your class or only a single specified attribute.

Antica Bottega Digitale srl
http://www.abd.it

Matt Brady

Tuesday 31 October 2006 1:50:05 pm

Hi Daniele,
Thanks for that... yes, that's the first thing I did however I couldn't quite grasp it... you can't select the class and attribute through the template wizard so I assume you need to rewrite the template for each text field. So... the default is
----------------------------------------------------
{default attribute_base='ContentObjectAttribute' html_class='full'}
<textarea id="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}" class="{eq( $html_class, 'half' )|choose( 'box', 'halfbox' )} ezcc-{$attribute.object.content_class.identifier} ezcca-{$attribute.object.content_class.identifier}_{$attribute.contentclass_attribute_identifier}" name="{$attribute_base}_data_text_{$attribute.id}" cols="70" rows="{$attribute.contentclass_attribute.data_int1}">{$attribute.content|wash}</textarea>
{/default}
----------------------------------------------------
My class is content_report and attribute is postcode. Now I want to change the field to be only 4 characters long and restricted to 4 characters.... I also want to add some text beside the label.
Any idea how I would change the template to suit? Once I have one done it will make a lot more sense to me and I'll be able to edit the others with no prob.

Any help here would be greatly appreciated.

It's not easy being easy.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu