Zum Inhalt springen

Content Rendering

Erstellt am 29. April 2005 · 3 Antworten · letzte Antwort am 29. April 2005

Tags: Frage

chacho ·

Hallo,
das ist mein index.php:

<?php	
if (!is_object($TSFE))    
{
	die("You cannot execute this file directly. It's meant to be included from index_ts.php");
}

ob_start();

// get path to root
$path = $TSFE->sys_page->getRootLine($TSFE->page['uid']);
// get root children
$menu = $TSFE->sys_page->getMenu($path[0]['uid']);
while(list($key, $val) = each($menu))
{
	echo '<a href=index.php?id=' . $val['uid'] . '>' . $val['subtitle'] . '</a><br />';
	// get current children
	$smenu = $TSFE->sys_page->getMenu($val['uid']);
	while(list($skey, $sval) = each($smenu))
	{
		echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href=index.php?id=' . $sval['uid'] . '>' . $sval['subtitle'] . '</a><br />';
	}
}

?>

<?php	$GLOBALS["TSFE"]->content = ob_get_clean(); ?>

Wie kriege ich jetzt der Inhalt (Texte, Bilder usw.) mit PHP?

Vielen Dank,
chacho

p.s.: my german is bad. that's why i'm trying to keep it short

laptop24 ·

Das ist viel zu wenig Information! Was ist das Problem?

(This is way to little information! What is the problem?)

chacho ·

@laptop24: i just wanna be able to get all page content with php. some function that returns all content in an array or something, so that i can render it as i wish. i know i could do that with typoscript, but i dont have the time for it right now

@Jörg: thanx a lot, this sure is going to help 🙂