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

Christian Futterlieb christian at futterlieb.ch
Tue Sep 9 16:59:13 CEST 2014


Hi Kamil

Maybe you'll be more comfortable with the extension titletag [1].

With the extension (v. 0.4.0) installed, you can paste following setup
to your template:

plugin.tx_titletag {
    overridePagetitle {
        fieldRequired = subtitle
        field = subtitle
        noTrimWrap = || - SUBTITLE SUFFIX|
    }
    pagetitle_stdWrap.noTrimWrap = || - TITLE SUFFIX|
}

Besides that, be sure you have set:

config.noPageTitle = 0
config.tx_titletag_enable = 1

Hope that helps =)

Regards, Christian


[1] http://typo3.org/extensions/repository/view/titletag


On 05.09.14 09:06, Kamil R wrote:
> 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>
> 
> 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.
> 
> Right now I have something like this in template settings:
> 
> # HEAD Title
> page.headerData {
> #Title TAG
>     10 = TEXT
>     10 {
>         value = <title>
>     }
>     12 = TEXT
>     12 {
>         field = subtitle // title
>         #page.if.isEmpty.field = title
>         override {
>             required = 1
>             data = levelfield : -1 , subtitle, slide
>         }
>     }
>     14 = TEXT
>     14 {
>         value = </title>
>     }   
> }



More information about the TYPO3-team-core mailing list