Forums / Setup & design / why css class attribute dont work in xml tags ?

why css class attribute dont work in xml tags ?

Author Message

Lida Popelo

Sunday 05 September 2004 3:45:24 am

In xml textfield i try to apply css class to tag <emphasize>, but it doesn't work.

In xml text field i have:

<emphasize class="my_css_class"> Something </emphasize>

In resulting html i have:

<i> Something </i>

Eivind Marienborg

Sunday 05 September 2004 4:38:40 am

An <emphasize> isn't a tag you can assign a class or id to. An emphasize is a tag to make the text italic, so assigning a class to it would be rather meaningless.

Eivind

Alex Jones

Sunday 05 September 2004 6:53:59 am

Lida, it is possible, try

<em [class="my_css_class"]>Emphasized text.</em>

Eivind, there may well be instances where you want one emphasize tag to appear different than another (perhaps a color, or font weight change. So, it is a valid request.

XML Tag Documentation: http://ez.no/ez_publish/documentation/reference/xml_tags

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Lida Popelo

Sunday 05 September 2004 7:00:37 am

Thanks, i tried it but tag <em class="my_css_class">Something</em> automaticaly replaces with tag <emphatsize class="my_css_class">Something</emphatsize> after i click publish button, and my_css_class doesn't applys to "Something"

Eivind Marienborg

Sunday 05 September 2004 10:08:19 am

Alex: Of course, sorry, I didn't think of that. Even though in that case I would create a span, and apply both the italic and the color to that in stead.

Bruce Morrison

Sunday 05 September 2004 4:10:58 pm

This issue may be due to many of the templates in design/standard/templates/content/datatype/view/ezxmltags
missing the code required to produce the class attribute in the output.

{section show=ne($classification,'')} class="{$classification}"{/section}

It looks as if this code is only availiale for table tags (table.tpl, th.tpl and td.tpl)

It appears that this has been added in to the SVN version
http://pubsvn.ez.no/websvn/listing.php?repname=nextgen&path=%2Ftrunk%2Fdesign%2Fstandard%2Ftemplates%2Fcontent%2Fdatatype%2Fview%2Fezxmltags%2F&rev=0&sc=1

The files from above location should be able to be copied over your existing ones.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Alex Jones

Tuesday 07 September 2004 6:26:15 am

Eivind, that is totally understandable. CSS is still new enough that we all think of it in slightly different ways. :)

Bruce, good call, I hadn't even thought of that.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

eZ debug

Timing: Jan 31 2025 03:44:49
Script start
Timing: Jan 31 2025 03:44:49
Module start 'content'
Timing: Jan 31 2025 03:44:49
Module end 'content'
Timing: Jan 31 2025 03:44:49
Script end

Main resources:

Total runtime0.2116 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.0625370.2734
Module start 'content' 0.00740.0153 958.33591,009.7031
Module end 'content' 0.02260.1890 1,968.03913,897.9141
Script end 0.2116  5,865.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00482.2903200.0002
Check MTime0.00140.6813200.0001
Mysql Total
Database connection0.00070.324110.0007
Mysqli_queries0.113553.62851410.0008
Looping result0.00140.65521390.0000
Template Total0.188589.110.1885
Template load0.00090.443710.0009
Template processing0.187688.631210.1876
Override
Cache load0.00060.301010.0006
Sytem overhead
Fetch class attribute can translate value0.00200.932610.0020
XML
Image XML parsing0.00030.130910.0003
General
dbfile0.00813.8132200.0004
String conversion0.00000.003330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs