[Typo3] Re: Replace class.tslib_content.php output?

Christopher bedlamhotel at gmail.com
Fri Jun 10 17:02:27 CEST 2005


Hello,

On 6/10/05, Marcel Douwstra <marcel.douwstra at tros.nl> wrote:
> 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.


The source seem to be for the content element type 'Image'; you might
want to have a look at a) Templavoila which you could use to make
content types of your own, or b) The CSS Styled ImgText extension [1].


-Christopher

[1] http://typo3.org/extensions/repository/search/css_styled_imgtext/



More information about the TYPO3-english mailing list