[TYPO3-english] Alternative page rendering using tx_templavoila_pi1->main_record

Andre Dittmar typo3 at hotbytes.de
Tue Jan 26 10:26:10 CET 2010

Hi Christopher,

> It's a little unclear to me what you mean by "pure content without any
> other HTML," but if you mean the content HTML only without the <html>,
> <head> and <body> tags, this is relatively simple to achieve. If you
> make the page accessible with another page type, you can completely
> alter the rendering (much like is sometimes done with 'printable'
> versions of pages):
> noMarkup = PAGE
> noMarkup {
>    ### Use a non-standard type number in the URL:
>    typeNum = 123
>        config {
>            #### Remove html, head and body tags:
>            disableAllHeaderCode = 1
>            ### Change mime type; may not be necessary depending on
> your application:
>            additionalHeaders = Content-type: text/plain
>        }
> }

Thanks a lot for your help, but that is not exactly what I try to  
achieve. In your example, all parts of the former HTML-file are still  
present. I try to extract only the contentpart, e.g. everything inside  
<div id="content">.

In my approach I try to override to normal page rendering with the  
special method tx_templavoila_pi1->main_record, which should fulfill  
exactly this requirement. In the end main_record() just prepare the  
data, the method renderElement render each single content element.  
Everything seems to be fine, but the method $this->markupObj- 
 >mergeFormDataIntoTemplateStructure() returns nothing (empty value).

Best regards,

More information about the TYPO3-english mailing list