Colored Text inside of a paragraph

Author Message

Mark Gilbert

Monday 16 February 2004 6:13:09 am

Hi all

I have been trying to change the color of a few words or a sentence located inside a paragraph of an article - either intro or body - they are eZXML text datatype. I have tried using the custom tag - <custom name="myblue"> and several other options. So far they have not worked for me. They end up converting the ONE paragraph into three paragraphs by adding <p> </p> tags. I get one paragraph that include the text before the custom tag. A new paragraph for the text using the custom tag and a pragraph with the text after the custom tag.

I am using eZ ver 3.3-3

Alex Jones

Monday 16 February 2004 6:31:20 am

That is odd. Could you post the code you are using? Specifically the code within the custom tag, an example of the text (including your custom tag call) within the XML Text Field and the HTML for that content that is output to the browser.

Hopefully that will help us help you.

Alex

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

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

Mark Gilbert

Monday 16 February 2004 10:39:14 am

This is the text from the myblue.tpl:
<span class="myblue">{$content}</span>

This is the text as I entered it into the Intro field:
This week, some members of the crew are reporting live from Hall A, attending "Top fair 2003". Top fair 2003 <custom name="myblue>this is my blue colored text</custom>is an international trade fair for Information Technology and Telecommunications. The trade fair is held for the 5th time.

This is the HTML that gets displayed on the actual web site:
<div class="intro"><p>
This week, some members of the crew are reporting live from Hall A, attending &quot;Top fair 2003&quot;. Top fair 2003
</p>
<span class="myblue"><p>

this is my blue colored text<br />
</p>
</span><p>
is an international trade fair for Information Technology and Telecommunications. The trade fair is held for the 5th time.
</p>
</div>

As you can see ez is taking my single paragraph and breaking it into three paragraphs:
<p>1st paragraph</p>
<span class="myblue"><p>blue text</p></span>
<p>3rd paragraph</p>

Any ideas how I can keep it all in one paragraph? Maybe you have an idea on how to selectivly eliminate the <p> tags??

Alex Jones

Monday 16 February 2004 1:02:40 pm

Try adding the following to your content.ini under <b>[CustomTagSettings]</b>:

IsInline[myblue]=true

Alex

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

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

Mark Gilbert

Monday 16 February 2004 7:01:08 pm

Thank you Alex it worked!!

I tried doing a search for "inline". I could not find anything that wouild have helped me with this. I know that they are working on documenting a lot of these things and I for one will be very thankful when they have documented a lot of these things. In fact it makes me wonder if theire have been other issue that I had given up on that could still work out.

Thanks again.
Mark

Alex Jones

Tuesday 17 February 2004 7:13:31 am

Good point Mark, I have added it to the Custom Tags documentation.

Alex

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

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

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 19 2025 10:46:14
Script start
Timing: Jan 19 2025 10:46:14
Module start 'layout'
Timing: Jan 19 2025 10:46:14
Module start 'content'
Timing: Jan 19 2025 10:46:15
Module end 'content'
Timing: Jan 19 2025 10:46:15
Script end

Main resources:

Total runtime1.3555 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.2578152.6250
Module start 'layout' 0.00620.0037 741.882839.4453
Module start 'content' 0.00991.3436 781.3281571.5000
Module end 'content' 1.35350.0020 1,352.828116.1563
Script end 1.3555  1,368.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.2933160.0002
Check MTime0.00200.1507160.0001
Mysql Total
Database connection0.00140.105610.0014
Mysqli_queries1.282994.6451660.0194
Looping result0.00080.0577640.0000
Template Total1.310996.720.6555
Template load0.00210.156020.0011
Template processing1.308896.550420.6544
Template load and register function0.00050.038110.0005
states
state_id_array0.00310.226810.0031
state_identifier_array0.00310.231220.0016
Override
Cache load0.00180.1354460.0000
Sytem overhead
Fetch class attribute can translate value0.00100.072020.0005
Fetch class attribute name0.00160.121470.0002
XML
Image XML parsing0.00070.049520.0003
class_abstraction
Instantiating content class attribute0.00000.001690.0000
General
dbfile0.00120.0873160.0001
String conversion0.00000.000640.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
6content/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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/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: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs