I’m building a simple Blog with Neos and have created an own plugin for this. All in all it workes well so far.
But in the plugins “show”-Action, which is called multiple times with different content, I need a dynamical meta-description and page-title for every dataset.
It’s a common matter, but I’m not sure if it’s possible with Neos / Flow.
In Typo3 I also would know how to grab the GPvars in TypoScript and get the Information I need. But in Neos I don’t.
Actually I found a way to manipulate the metadescription for the show-action through a ViewHelper, which is called in the layout and fetching the data from the URL GET parameter - but I didn’t really like this solution.
Beside this I still missing a solution for a dynamical page title.
I got no answer or hints for this, so I figured it out by myself.
With an EEL Helper it’s quite easy to manipulate the meta tags of a page. Be aware I’m working with Neos 2.3 LTS - the namespaces here are “TYPO3” and not “NEOS”.
Here we go:
a) Write your EEL Helper (the Helper itself didn’t change from Neos V2 to V3). My helper returns the PageTitle as string:
If you’re giving a shot to the Example-ViewHelper from the Neos documentation, so replace “GetArgument” with “Example” and “myFunction” with “wrapInCurlyBrackets”.
The ‘uncached’ Part in the “titleTag”-Property is important in case of dynamical changes of the page title.