What effect are you trying to achieve? You mention that you do not want the text wrapped in paragraph tags, does that mean you just want line break tags inserted?
Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
Alex, all I want is to be able to display xml text fields without a gap above and below due to the embedded <P>. If I leave paragraph.tpl untouched, then my new paragraphs are fine, but the gap above and below the whole field comes back.
Ahhh. Perhaps you could get around the issue with CSS, thus ensuring that your markup remains valid? Is the XMLTextfield within a container element? If not, could it be? If you were to wrap a div around that XML Text Field in your template and set the top and bottom margins to negative values like -0.6em you would be able to reduce or eliminate the gap you are speaking of.
Example:
<div style="margin: -0.6em 0;">{your ez code}</div>
Of course the style elements could be moved to a separate style sheet, but it get's the idea across.
Would that work?
Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
Spot on, Alex. I turns out that the <P> is only critical in a small number of templates, so I've placed the field in a container as you suggested i.e. <DIV STYLE="margin: -1.7em 0 -1.7em 0;">. This starts the paragraph one line above it normally would have, and stops the gap at the end. Nice one thanks!
For anyone interested I eventually found another solution. I found that when xml textfields were placed in their own table cell, then the margins above and below did not occur. Sounds so simple really!
You must be logged in to post messages in this topic!