[TYPO3-dev] my first (Backend-)Extension: integrate main content into standard layout from kickstarter

Xavier Perseguers typo3 at perseguers.ch
Tue Oct 28 14:27:02 CET 2008


Hello,

> For my first Typo3-extension, a backend module, I have a layout problem. I want to use much of the layout from the kickstarter, but when I keep it, my own content (the main content) is on the top (source code only '<form>...</form>' [created by a php-function], and below is the standard content from the kickstarter between '<html>...</html>').
> A concrete example for this: In mod1/index.php from kickstarter there is a function moduleContent(). In that function: if we go to switch and to case2 we have something like:
>       $content='<div align=center><strong>Menu item #2...</strong></div>';
>       $this->content.=$this->doc->section('Message #2:',$content,0,1);
> Here the html-code from $content is at the right place. But if instead of html-code I give $content a function (with php-code that creates a form),  the position of the content of this function is at the wrong place, as described at the beginning.
> How can I solve this problem?

Not very clear but I guess you tried to modify the rendering of 
moduleContent() with something like

$this->content = $this->some_method_you_wrote();

Instead you should *append* the return HTML code of your method to 
$this->content, meaning you should write

$this->content .= $this->come_method_you_wrote();

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html




More information about the TYPO3-dev mailing list