Forums / Extensions / EZOE - custom tags

EZOE - custom tags

Author Message

Daniel Puchatek

Wednesday 09 September 2009 2:14:47 am

Hi,

I would like to use custom tags for creating forms i've added:
[CustomTagSettings]
AvailableCustomTags[]=form
AvailableCustomTags[]=input
AvailableCustomTags[]=radio
AvailableCustomTags[]=checkbox
AvailableCustomTags[]=textarea

in content.ini.append.php and i can use thouse tags in editor.

when i turn off ezoe i can see somethinf like this:
<custom name="form">
<custom name="radio" custom:name="test" custom:value="123">radio</custom>
<custom name="radio" custom:name="test" custom:value="1234">radio</custom>
<custom name="input" custom:name="textInput">input</custom>
</custom>

i've created templates for every new tag and it works almost as expected :)

example customtag_radio.tpl override:
{*?template charset=utf-8?*}
<label>
<input type="radio" name="{$name}" value="{$value}" />{$content}
</label>

But when i look at page source of generated xml block i get:
<label><input value="awda" type="radio"></label>
<p style="font-size: 14px;">radio</p>

as you can see NAME attribute is not present and <label> is closed in wrong place. Any clue what might be wrong ?

I also have a question about displaying custom tags in ezoe ... can i change the way different tags are shown in the editor window ?

André R.

Wednesday 09 September 2009 3:04:12 am

I guess it conflicts with the name attribute on custom tags, so use a different name for your custom attribute.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Daniel Puchatek

Wednesday 09 September 2009 3:55:39 am

Unfortunatly it did not help :/ i've changed $name to $attr_name and same thing happens. Look at the output of a template

from:
<label>
<input type="radio" name="{$name}" value="{$value}" />{$content}
</label>

to:
<label>
<input value="awda" type="radio"> <-- no ending for <input ... />
</label>
<p style="font-size: 14px;">
radio
</p>

I've double checked and Ez Publish uses this template to generate my radio button but for some reason it deletes name="" and twists my html.

André R.

Wednesday 09 September 2009 11:25:06 am

Could you try:

<label>
<input type="radio" name="{$attr_name}" value="{$value}" />
</label>

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom