Forums / Setup & design / Can't get rid of the <p> Tag

Can't get rid of the <p> Tag

Author Message

Thomas Schamm

Monday 06 October 2003 2:52:20 pm

Hi there,

I'm using a template for showing the folder name as headline and in the next line the folder description, the 'folder class' is the same as the standard ezp3.2 folder class.
My code is like this:
<div class="h2">{$node_name|wash}</div>
<div class="h3">{attribute_view_gui attribute=$node.object.data_map.description}</div>

My problem is, that ezp takes the description of the folder, as it is an xml text field, and adds a <p> at the beginning and a </p> at the end.
I tried to create a /design/standard/templates/content/datatype/view/ezxmltags/ noparagraph.tpl with only {$content} within it, added AvailableCustomTags[]=noparagraph to content.ini and put a <custom name='noparagraph'> tag around the folder descripton, but it didn't work, there still is the <p> tag.
Do i have to change the paragraph.tpl, or is there a possibility to only change the behavior of the xml field, not to make a <p> at the beg and a </p> and the end of the input?

Paul Forsyth

Tuesday 07 October 2003 12:22:39 am

You can override the paragraph tag locally, and remove the <p> from it.

But your custom tag should work. Do you have debug on and have errors? When you publish your object with the custom tag does it work?

paul

Thomas Schamm

Tuesday 07 October 2003 3:30:27 am

The custom tag itself is working, but there is still added the <p> tag around the {$content}. I am thinking about removing the <p> tag in the paragraph.tpl and making a custom <p> tag so that i have one if i want the text to be a paragraph.

Paul Forsyth

Tuesday 07 October 2003 3:38:01 am

ok.

paragraph.tpl must always get called then.