[TYPO3-english] Display page title in page

Christian Futterlieb christian at futterlieb.ch
Tue Jul 8 16:44:07 CEST 2014


Hi armin

You can use f:cObject view helper [1].

Put something like that in your typoscript template:

lib.pageTitle = TEXT
lib.pageTitle.data = page:title

and in the fluid template:

<h1><f:cObject typoscriptObjectPath="lib.pageTitle" /></h1>

Regards, Christian


[1]
http://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/CObject.html


On 08.07.14 16:19, armin otto wrote:
> Hi,
> 
> I have installed typo3 6.19 with the bootstrap package and I'm now
> modifying it to my needs.
> 
> It was ages ago when I first had to wrestle with typo3, so forgive me
> for not being quite up to date on how typo3 seems to work right now. :)
> 
> Anyway, what I am trying to do right now should be simple:  I want the
> header partial template in
> typo3conf/ext/speciality/Resources/Private/Partials/header.html  to
> render the page title as defined in the typo3 backend
> 
> right now the header.html file looks like this:
> [code]
> {namespace v=Tx_Vhs_ViewHelpers}
> <f:layout name="Page"/>
> <div      ...
> 
>     <f:section name="Header">
>                 <!-- Default header -->
>                 <header class="jumbotron" role="banner">
>                     <f:render section="NavigationSpecial"
> partial="NavigationSpecial" optional="TRUE" arguments="{_all}"/>
> 
>                     <h1> Something something </h1>
> 
>                     <p class="lead">
>                         <f:translate key="lead-text"
> extensionName="speciality"/>
>                     </p>
>                 </header>
>     </f:section>
> </div>
> [/code]
> 
> I was kinda hoping of having only to insert one line like [code]
> <h1> <v:page.title /> </h1>
> [/code]
> and be done with it, but no such luck.
> 
> So: What is the best way to do it?
> 
> Thanks!



More information about the TYPO3-english mailing list