Help!! content part output (divs vs tables)

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
gthibodeaux
Posts: 13
Joined: Wed 22. Jun 2005, 18:02
Contact:

Help!! content part output (divs vs tables)

Post 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
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post 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
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
gthibodeaux
Posts: 13
Joined: Wed 22. Jun 2005, 18:02
Contact:

Post by gthibodeaux »

Do I have to update the CMS then, or can I just use that code in 1.25?
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Its only included at the last 1.26 CVS. Condition precedent is an update.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
gthibodeaux
Posts: 13
Joined: Wed 22. Jun 2005, 18:02
Contact:

Post by gthibodeaux »

ok then, thanks for the info, I'll be doing the update today!
gthibodeaux
Posts: 13
Joined: Wed 22. Jun 2005, 18:02
Contact:

Post 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...
gthibodeaux
Posts: 13
Joined: Wed 22. Jun 2005, 18:02
Contact:

Post 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
Post Reply