Forums / Setup & design / How do I make image class attribute "caption" loose the <p> tags?

How do I make image class attribute "caption" loose the <p> tags?

Author Message

Trond Åge Kvalø

Monday 22 March 2004 8:35:45 am

I have an XML-text field and I use the Online Editor to insert text and images.

My problem is that the caption of the image class is also an xml text field. So when I use:

$object.data_map.caption.content.output.output_text

to insert my caption, it's embedded in paragraph tags.

Yup, I <b>could</b> alter the class so that the caption field is just a text field. But I fear that might have an unwanted impact on ny admin site (where I use the standard admin design).

So I tried to create an override for content/datatype/view/ezxmltags/paragraph.tpl where I set up image (i.e. 5) as class match. But that didn't work. Probably since this image caption is inserted into a custom class. But if I use the ID of this custom class on my paragraph override <b>all</b> the paragraphs lose their p tags. And only want to loose the p-tags if they are around the class attribute "caption".

Any ideas on how to achieve that?

best regards
trondåge

trondåge