Forums / Developer / XML Text field help

XML Text field help

Author Message

Glenn MacGregor

Wednesday 21 April 2004 7:46:32 am

Hi All (again)...

Thanks for the info on the section_id. Now I have a problem using XML Text field. I put in html and some of it stays after I hit the "Send for publish" while other tags disappear.

I am looking to underline some text in the XML Text field, using the html underline tag doesn't work. I also tried adding a entry to my stylesheet ,
<i>
.underlineText
{
text-decoration: underline;
}
</i>

And in the XML Text field I added (around the line to underline) the following:
<i>
<div class="underlineText">
TEXT TO UNDERLINE
</div>
</i>

Hit the "Send for Publishing" and it is gone.

Is there anyway to do this???

Thanks again

Glenn MacGregor

Alex Jones

Wednesday 21 April 2004 8:03:28 am

Yup, this is possible. You need to create a custom tag though. See http://ez.no/ez_publish/documentation/customization/components/datatypes/ezxmltext/custom_tags for information about creating them.

Alex

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

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

Glenn MacGregor

Wednesday 21 April 2004 8:48:21 am

Alex,

Thanks! Going over the docs I saw the location of all the built-in tags that the XML Text field supports in 'design/standard/templates/content/datatype/view/ezxmltags/' directory.
In there I see line.tpl which contains:
{$content} <br />

Does this mean that in any XML Text field I should be able to put the following

<line>THIS IS A TEST</line>

or

<custom name="line">THIS IS A TEST</custom>

It is not letting me do either.

Alex Jones

Wednesday 21 April 2004 9:00:37 am

To be honest, I'm not sure about the line tag, it may just be used automatically to deal with a single carriage return in XML Text Fields. It isn't listed as a tag on http://ez.no/ez_publish/documentation/customization/components/datatypes/ezxmltext/tags

Alex

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

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

Ekkehard Dörre

Thursday 22 April 2004 8:45:13 am

Hi,

just add in your content.ini(.php)

[CustomTagSettings]

AvailableCustomTags[]=br
IsInline[br]=true

because there is already a br.tpl in folder
design/standard/templates/content/datatype/view/ezxmltags/

Use in XML-Field:

<custom name='br'></custom>
makes

<br />

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

eZ debug

Timing: Jan 19 2025 01:23:25
Script start
Timing: Jan 19 2025 01:23:25
Module start 'content'
Timing: Jan 19 2025 01:23:26
Module end 'content'
Timing: Jan 19 2025 01:23:27
Script end

Main resources:

Total runtime1.2498 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0107 588.8516180.8438
Module start 'content' 0.01071.0762 769.6953611.0781
Module end 'content' 1.08690.1628 1,380.7734337.3828
Script end 1.2497  1,718.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.3792210.0002
Check MTime0.00170.1322210.0001
Mysql Total
Database connection0.00170.134710.0017
Mysqli_queries1.158392.68092020.0057
Looping result0.00230.18012000.0000
Template Total1.206396.520.6032
Template load0.00240.192320.0012
Template processing1.203996.329820.6020
Template load and register function0.00040.032510.0004
states
state_id_array0.00240.194510.0024
state_identifier_array0.00240.195420.0012
Override
Cache load0.00200.1606540.0000
Sytem overhead
Fetch class attribute can translate value0.00210.168040.0005
Fetch class attribute name0.00130.107470.0002
XML
Image XML parsing0.00120.097540.0003
class_abstraction
Instantiating content class attribute0.00000.001280.0000
General
dbfile0.00430.3431330.0001
String conversion0.00000.001030.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs