[TYPO3-templavoila] default content when page has no content

Bernhard Kraft kraftb at kraftb.at
Wed Jan 18 03:29:57 CET 2006


Bartosz Aninowski wrote:
> Hi
> I am looking for solutions to add default content form  page A to page B 
> when page B has no content.
> Here is my traditional way
> 
> colLeft =COA
> colLeft {
> 5 < styles.content.getLeft
> 10 = COA
> 10 {
> 5 <  temp.defaultLeft.get
> if.isFalse.numRows < styles.content.getLeft
> }
> }

you could try to create a "Content Elements" field but not map it anywhere
and a TS-path element with "lib.colLeft" for example.

Then add the following TS Setup to one of your templates:

lib.colLeft = RECORDS
lib.colLeft {
  source.fields = nameOfContentElementsField
  source.ifEmpty = tt_content_UID1,tt_content_UID2,...
  conf.tt_content < tt_content
}

pherhaps it would also work to add it directly into the <TypoScript> tag of
the Content Elements fields DS-XML.

greets,
Bernhard



More information about the TYPO3-project-templavoila mailing list