[TYPO3-english] Alternative page rendering using tx_templavoila_pi1->main_record
dmitry.dulepov+t3ml at gmail.com
Tue Jan 26 13:46:01 CET 2010
On 2010-01-26 12:52:18 +0200, Andre Dittmar said:
> My thought was, that compared to main_page() the method main_record()
> does provide the posibility to override the current DS/TO of the page
> just return all records of a given table (e.g. tt_content). In the
> default TO of the page, I would still have all the HTML-frame arround
> the content. Now I just try to render only the content elements of a
> given page.
If I were you, I would read TSRef and notice that
"config.disableAllHeaderCode = 1" will remove all head code. Next I
would map <body> as OUTER. This will give me page content without outer
markup. Is this what you are looking for?
> Background: I use Tabs which loading the tab content via AJAX from
> subpages. At the moment the whole page is loaded and the content is
> which means to me to rid of everything arround the content :-)
Huh... You should have started with this, not with question about
TemplaVoila. Always start with the original problem because your way to
solve it is not necessarily the best way ;)
Basically you need this code in your AJAX handler:
$conf = array(
'select.' => array(
'orderBy' => 'sorting',
'pidInList' => $pageId
'table' => 'tt_content'
$content = $cObj->cObjGetSingle($tsConfName, $tsConf);
This will render all content elements from the page. Note that it will
render also unlinked elements! You may want to extract uid values from
tx_templavoila_flex field of the page record to get exact uid list, But
make sure you keep pidInList. You *must* have it or you will get
results for a wrong page.
"Trust me, I am a doctor!" (c) Gregory House, M.D.
More information about the TYPO3-english