Forums / Setup & design / Custom tags and color

Custom tags and color

Author Message

Jeremy A

Monday 21 July 2008 4:56:42 am

Hi,

I know this subject has been talked but I didn't find what I would like to do.

I have added in settings/override/content.ini.append.php :

[CustomTagSettings]
AvailableCustomTags[]=edito
IsInline[edito]=true

[edito]
CustomAttributes[]
CustomAttributes[]=color

Then, in a new tpl : design/standard/templates/content/datatype/view/ezxmltags/edito.tpl :

<span style="color:{$color}">{$content}</span>

After clearing caches, I have in the html source :

<paragraph>
<custom custom:color="red" name="edito">test</custom>
</paragraph>

Result : the text is not in red color, and I don't see my <span> code...

Why ? And how can I do better ?

Thank you.

André R.

Monday 21 July 2008 5:24:03 am

Can not reproduce.

Did everything like you expect I placed the template in:
extension/<my_extension>/design/standard/templates/content/datatype/view/ezxmltags/edito.tpl

And enabled color picker in Oniline edtior 5.0 (content.ini):

[CustomAttribute_edito_color]
Type=color
Name=Text Color

Then I cleared override cache and cleared view cache on the specific node I tested this on ( in admin: click on big icon next to the "title[class name]" of the current node ).

But even before I added the template I didn't get the output you describe(I dind't get anything, I just got a warning that the template didn't exist), the only place I get what you got is if I disable Online Editor while editing.

Warning before I created the template:

No template could be loaded for "content/datatype/view/ezxmltags/edito.tpl" using resource "design"

Output while editing with editor disabled:

<custom name="edito" custom:color="#11ed2c">asdfsdfdsf</custom> 

Output in content/view after adding template and clearing caches:

<span style="color:#11ed2c">asdfsdfdsf</span> 

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

Jeremy A

Wednesday 23 July 2008 4:42:33 am

OK you're right,

extension/<my_extension>/design/standard/templates/content/datatype/view/ezxmltags/**.tpl

is the good one.
Thanks :)