actually the title is the whole question.
I just want to modify the template so that the current page title is automatically shown (i'm working with html templates so I just need the bit of typoscript to get the page title out of the database)
I hope that's possible
The question is quite old but I still want to add something I never read here.
TYPO3 offers many things concerning the header, and it's right that it's also possible to render it completely individual. Nevertheless all the nice options of TYPO3 are more or less disabled by the individual solution.
So first the direct answer on the question:
The default page title can be overridden like this
If several page types are defined and the title shall be set individually for each type, the configuration can be noted inside the page-definitions:
Below still a
lib.pagetitle
which makes a little bit more than only using title or subtitle - it uses news-title if the extension is used on a page:Now still some background why I think some individual header might not be the best solution:
Implementing this whole logic manually again in an own template in my opinion is not useful and I think headers should be only disabled for special page-types like AJAX or dynamic PDF-files. This is the primary reason that I consider that option as useful.
Her still the current link for the most recent documentation about the
config
-options in TypoScript (anchor pagetitle): https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#pagetitleIf you want to use this in an fluid page template you can also simple use
{data. title}
to access the page title.I prefer the vhs solution:
https://fluidtypo3.org/viewhelpers/vhs/master/Page/InfoViewHelper.html
To get current page title:
For meta data :
Its very important to place meta after header tag when we are gone through mobile compatible website
In order to prevent quirks mode in IE9 I need to add this lines at the very top of every HTML page:
You can write the whole header by yourself, by adding disableAllHeaderCode = 1 to your typoscript or you can hack it by adding your meta tag directly to the head tag:
Place this at your typoscript
httpEquivalent: (Since TYPO3 4.7) If set to 1, the http-equiv attribute is used in the meta tag instead of the “name” attribute. Default: 0.
For more information about TYPO3 stuff you may visit my blog
https://jainishsenjaliya.wordpress.com/2013/10/10/put-meta-tag-on-top-of-header-section-in-typo3/
If you want to use a
fluid
only solution, install theVHS
extension and you can output the page title without using anyTypoScript
at all like this:Tag Example:
Inline Example:
{v:page.header.title(title: 'NULL', whitespaceString: '' '', setIndexedDocTitle: 1)}
call the lib.page_title where want to render typoscript with this lines
I hope this helps !!!