Zum Inhalt springen

Wrapping of images, tables, bullet lists

Erstellt am 7. Mai 2008 · 1 Antwort · letzte Antwort am 8. Mai 2008

Tags: Inhaltselemente, Frage, English

Invisible Kid ·

Hello to everybody!

I have a problem with content wrapping. I need to put every content element (without header) into <div>-tags with some class.
For example, I may wrap every paragraph of text by adding such string into Template Constants:

styles.content.textStyle.altWrap = <div class="die_text_middle">|</div>

But how may I do the same for images in content elements of types "Image" and "Text with image"? And the same for "Table" and "Bullet List"?

And another question.
How could I change the height of 'clear.gif', wich is inserted before images and tables?
For example, this string in Template Setup will make the space amount of 10px before images, that were insereted with type "Image":

tt_content.image.20.spaceBelowAbove = 10

But how can I do the same for images in "Text with Image" type of content elements?

String:

tt_content.textpic.20.spaceBelowAbove = 50

makes a distance between text and image inside content element, but it doesn't change space between image and header or previous content element!

Thanks for everybody, who will answer me!

Invisible Kid ·

Seems, I have a solution.
This may be done by adding such lines in Template Setup:

CONTENT = CONTENT
CONTENT {
table = tt_content
select.orderBy = sorting
/*and so on*/

renderObj.image.20.stdWrap.wrap = <div style="margin-top: 11px;"> | </div>

renderObj.textpic.20.stdWrap.wrap = <div style="margin-top: 11px;"> | </div>

renderObj.table.20.stdWrap.wrap = <div style="margin-top: 11px;"> | </div>

renderObj.uploads.20.stdWrap.wrap = <div style="margin-top: 11px;"> | </div>
}

But there is still a little problem: when we have type "Text with Image" those configuration wraps whole content elemnt, but how could I wrap only images from it?