Page 1 of 1
Help!! content part output (divs vs tables)
Posted: Wed 21. Dec 2005, 05:58
by gthibodeaux
I need some help please...
I would really like to have the output of the content parts: WYSIWYG HTML & images, to be output as divs instead of tables. Can anyone tell me if this is possible and if so how to accomplish it?
Thank's in advance for your help!!
Greg
Posted: Wed 21. Dec 2005, 12:50
by flip-flop
Hi Greg,
indeed, it is possible.
1. - V 1.26 CVS (latest)
2. Take look at this new switch in config.template_default.php
$template_default["article"]["image_div"] = true;
Generated div for picture:
Code: Select all
<div class="imgDIVtopLeft"><div class="image_td">
<div class="imgDIVtopCenter" align="center"><div class="image_td">
<div class="imgDIVbottomLeft"><div class="image_td">
<div class="imgDIVbottomCenter" align="center"><div class="image_td">
<div class="imgDIVbottomRight" align="right"><div class="image_td">
<div class="imgDIVinTextLeft" align="left"><div class="image_td">
<div class="imgDIVinTextRight" align="right"><div class="image_td">
And for the content always: <div class="articleText">
Include this classes in frontentd.css and play around a little bit.
At this moment I haven´t time enough to do so.
e.g.
Code: Select all
.imgDIVinTextRight {
float: right;
margin:8px 20px 5px 5px; padding:0px;
border:0;
}
.imgDIVinTextLeft {
float: left;
margin:8px 5px 5px 20px; padding:0px;
border:0;
}
.imgDIVtopLeft {
margin:8px 10px 5px 20px; padding:0px;
border:0;
}
.imgDIVtopCenter {
margin:8px -50% 5px -50%; padding:0px;
border:0;
}
Gruß Knut
Posted: Wed 21. Dec 2005, 13:48
by gthibodeaux
Do I have to update the CMS then, or can I just use that code in 1.25?
Posted: Wed 21. Dec 2005, 14:46
by flip-flop
Its only included at the last 1.26 CVS. Condition precedent is an update.
Gruß Knut
Posted: Wed 21. Dec 2005, 14:57
by gthibodeaux
ok then, thanks for the info, I'll be doing the update today!
Posted: Wed 21. Dec 2005, 23:23
by gthibodeaux
it's still generating a table... look here:
http://t4s.org/cms/index.php
you can see this:
<div class="articleText"><p><a name="jump1"></a><h1>main</h1><table border="0" cellspacing="0" width="1%" cellpadding="0">
<tr><td class="imagelisttd"><img src="content/images/ddfc7963cce68dde06cbabb0c15733bd.gif" width="116" height="31" border="0" class="imagelistimg" alt="welcome.gif"></td></tr>
<tr><td><img src="img/leer.gif" width="1" height="5" alt="" /></td></tr>
</table>
this is generated using the image content part...
Posted: Thu 22. Dec 2005, 00:11
by gthibodeaux
OK I think I've got it... I changed the content part to "text /w image" and now it's outputting divs. It would be nice if the "image" content part did the same thing but this will suffice!
Greg