[online editor] custom tag and css class

Author Message

Frederic GUEHO

Tuesday 21 August 2007 8:23:19 am

Hi,

I'd like to apply my own CSS classes when I insert one of my custom tag with the online editor.

Is it possible ? How ?

I can do it with generic tags like <a>, <p>, etc. But I can't figure out how to do it with custom tags.

Mark Marsiglio

Tuesday 21 August 2007 8:51:27 am

You will need to enable the class options in the content.ini.append for your site. I think you have to do it in both the user and admin siteaccesses (not 100% sure about that).

There are some examples in the content.ini in the main settings folder.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Frederic GUEHO

Wednesday 22 August 2007 2:18:40 am

I think it is not possible for custom tags.

Here, you can see it is possible for xml block, like headings. The class parameter [class=""] is avalaible :
http://ez.no/doc/ez_publish/technical_manual/3_9/reference/datatypes/xml_block#headings

Here, you can it is not possible for cutom tags. The class parameter [class=""] is not avalaible :
http://ez.no/doc/ez_publish/technical_manual/3_9/reference/datatypes/xml_block/custom_tags

I hope I'm wrong...

Anyone ?

Frédéric DAVID

Tuesday 28 August 2007 2:14:12 am

You can use a custom attribute "class" in your custom tag. In my custom tag acronym, I put :

<acronym title="{$title}"{if $class|ne('')}  class="{$class}"{/if}>{$content}</acronym>

And It works.

Blog : http://www.frefred.fr/blog/ez-publish
feZ Meta Data : http://projects.ez.no/fezmetadata

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