[TYPO3-english] Translate page title

Daniel Calderini daniel.calderini at wng.ch
Fri Apr 24 14:13:07 CEST 2009


Hi list,

I build the <title> of my pages with the following pattern:
Website Name - Page Title - Page Subtitle

If a page has no subtitle, I use the subtitle of the homepage.

I have the following pagetree:

- Site root (shortcut to home)
-- Home
-- First page
--- Subpage
-- Second page
-- ...

And here is the typoscript that creates the title:

1 = COA
1 {
	wrap = <title> | </title>
	
	10 = TEXT
	10 {
		value = Website name
		wrap = | &nbsp;-&nbsp;
	}
	
	20 = TEXT
	20.data = page:title
	
	30 = TEXT
	30 {
		wrap = &nbsp;-&nbsp; |
		data = DB:pages:2:abstract
		
		override.cObject = TEXT
		override.cObject.data = page:abstract
	}
}

This works well if there is only one language on the site.
But on a multi-language website where a page has no subtitle, this TS 
gets the original homepage subtitle (not the translated one).

Is there another way than DB:pages:2:abstract to get the subtitle of the 
homepage in the correct language?

Regards
Daniel Calderini


More information about the TYPO3-english mailing list