eZ Community » Forums » Setup & design » How do I make image class attribute...
expandshrink

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

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

Monday 22 March 2004 5:35:45 pm

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

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu