[TYPO3-core] Different title tag when using "subtitle" field

Kamil R pankamilr at gmail.com
Mon Sep 8 09:09:05 CEST 2014

Quote: Jo Hasenau (cybercraft) wrote on Fri, 05 September 2014 10:22
> Am 05.09.2014 09:06, schrieb Kamil R:
> > I want to make this situation to happen.
> > When I fill "subtitle" field I want to make something like that
> > <title>subtitle field only</title>
> > If subtitle field isn't fill then use simple title field and append
> > custom text <title>title field - custom text</title>
> You should ask questions like this in the typo3.english list (newsgroup 
> or forum as well), since this one here is for TYPO3 core development 
> topics only.

Sorry for misplace this topic. If there is some option that i can use to relocate it, i will do this.

> > Of course I can do this and write this custom text in the field but when
> > I have many entries to edit it's wasting my time when I would make this
> > happen upon script.
> Anyway, here's a solution for your task:
> page.headerData {
>    10 = TEXT
>    10 {
>      dataWrap = <title>{field:title} - custom text</title>
>      override.dataWrap = <title>{field:subtitle}</title>
>      override.fieldRequired = subtitle
>    }
> }

I'm not so good in TS, but I'm trying. I replace my code with yours and now it prints me both "wraps" at one time.
Now my code looks like this:

page.headerData {
#Title TAG
	10 = TEXT
	10 {
		dataWrap = <title>| -something</title>
		override.dataWrap = | -something else
		override.fieldRequired = subtitle

As a reminder of the question:
I want to have other title on the pages that has filled "subtitle" field, and on the other I want to add some static text in the end of title ie:

at home page:
<title>My custom title placed in subtitle field</title> (only subtitle field)

at about page:
<title>About Us - My custom text</title> (where About Us is page title)

Thanks for your time to help me with this issue.

> Joey

More information about the TYPO3-team-core mailing list