[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.

eZ debug

Timing: Jan 18 2025 14:58:34
Script start
Timing: Jan 18 2025 14:58:34
Module start 'layout'
Timing: Jan 18 2025 14:58:34
Module start 'content'
Timing: Jan 18 2025 14:58:35
Module end 'content'
Timing: Jan 18 2025 14:58:35
Script end

Main resources:

Total runtime1.4380 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.0313152.6406
Module start 'layout' 0.00470.0024 740.671939.4766
Module start 'content' 0.00711.4296 780.1484590.1094
Module end 'content' 1.43670.0012 1,370.257812.1250
Script end 1.4379  1,382.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2140160.0002
Check MTime0.00130.0909160.0001
Mysql Total
Database connection0.00070.049310.0007
Mysqli_queries1.389496.6201620.0224
Looping result0.00050.0374600.0000
Template Total1.410798.120.7054
Template load0.00200.140220.0010
Template processing1.408797.966420.7044
Template load and register function0.00010.010410.0001
states
state_id_array0.00090.064510.0009
state_identifier_array0.00110.079420.0006
Override
Cache load0.00170.1180240.0001
Sytem overhead
Fetch class attribute can translate value0.00070.048130.0002
Fetch class attribute name0.00250.176460.0004
XML
Image XML parsing0.00100.072730.0003
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00080.0522210.0000
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs