[TYPO3-english] Render pages within one page

Bernhard Kraft kraftb at kraftb.at
Sun Oct 4 22:58:10 CEST 2009


Genaro Costa schrieb:

> One option is to use IFRAMEs. That slows down the page load time (due to
> multiple http requests).
> I prefer to render the content inside DIVs.
> Another option is to fetch the pages using JS and replace the DIV content.
> That also perform multiple http requests.
> 
> It would be great to have an alternative to render all html in one page.

The question is: Do you want to render the complete page, and put all
content between the "<body>" tag into the mentioned <div>? Or do you
simply want to render the content of some column (like Normal,Left,
Border) into your div?

The later one is easy. Just put a marker, subpart or whatever in your
div. Then use the following TypoScript to render the content of a given
page:

lib.otherContent = CONTENT
lib.otherContent {
	table = tt_content
	select {
		pidInList = UID_OF_OTHER_PAGE
		orderBy = sorting

		# Show "Normal" column
		andWhere = colPos=0

		# Only need this when using multiple languages
		languageField = sys_language_uid
	}
}

This will render all content elements of the "normal" column of page
"UID_OF_OTHER_PAGE".

So simply put this into your "page" TypoScript object like:

page.10.marks.otherContent < lib.otherContent


greets,
Bernhard


More information about the TYPO3-english mailing list