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.