[Typo3] Re: Replace class.tslib_content.php output?
Marcel Douwstra
marcel.douwstra at tros.nl
Fri Jun 10 11:18:06 CEST 2005
Sorry for my late reply, it seems I my membership to the mailinglist
was disabled due to bounces.
Anywayz, here is (just) an example of some hardcoded HTML in
class.tslib_content :
01089 switch ($contentPosition) {
01090 case '0': // above
01091 $output= '<div
align="'.$align.'">'.$tablecode.'</div>'.$this->wrapSpace($content,
$spaceBelowAbove.'|0');
01092 break;
01093 case '8': // below
01094 $output=
$this->wrapSpace($content, '0|'.$spaceBelowAbove).'<div
align="'.$align.'">'.$tablecode.'</div>';
01095 break;
01096 case '16': // in text
01097 $output=
$tablecode.$content;
01098 break;
01099 case '24': // in text, no
wrap
01100 $theResult = '';
01101 $theResult.= '<table
border="0" cellspacing="0" cellpadding="0"
class="imgtext-nowrap"><tr>';
01102 if ($align=='right') {
01103 $theResult.= '<td
valign="top">'.$content.'</td><td valign="top">'.$tablecode.'</td>';
01104 } else {
01105 $theResult.= '<td
valign="top">'.$tablecode.'</td><td valign="top">'.$content.'</td>';
01106 }
01107 $theResult.=
'</tr></table>';
01108 $output= $theResult;
01109 break;
01110 }
You probably understand this is something I would rather have in a
template file or something like that.
But in the meantime we've been creating an extension for this so we can
use our own templates for content.
Cheers,
Marcel
*** TYPO3 FORUM: http://typo3.tros.nl ***
Op 10-jun-05 om 10:50 heeft typo3-english-request at lists.netfielders.de
het volgende geschreven:
> Marcel Douwstra wrote:
> > Hi list,
> >
> > I;ve been trying to get some pages done with the standard content
> > functionality of Typo3 (maybe you've read my last message about
> this).
> >
> > I just discovered that most of the HTML output is HARDCODED inline in
> > class.tslib_content.php which was quite a disapointment :(
>
> What exactly is hardcoded in PHP? CSS_styled_content is mainly TS and
> you can configure almost anything by modifying the content output
> there.
> Look for some of JoH's postings in order to get an idea of how much is
> possible with pure TS.
>
> > What I would like to know is :
> >
> > Would you recommend me to change the class.tslib_content.php or build
> > replacing templates for output?
>
> No 2 is the way to go...
>
> Cheers,
> Michael
More information about the TYPO3-english
mailing list