Search code examples
typo3meta-tagsfluidtypo3-6.2.x

Render meta tag from uncached plugin action


I want to render a HTML meta tag (<link rel="prev" href="..."/>) from the fluid template of one of my uncached actions.

Using the vhs-Viewhelper v:page.header.link does not work for uncached plugin actions, and I cannot make the action cached.

But I'd really like to render the tag from the fluid-template of that action, because that is the place where all the relevant information is present. I just need to render a partial to get the href. If doing this from other places, I'd probably have to re-implement much of my logic.

Any ideas how to do this?


Solution

  • I had the same situation and using <v:page.header works for me in uncached context:

    <v:page.header allowMoveToFooter="0">
        <meta property="og:title" content="{f:translate(key:'mobilizations.share.title')}" />
        <link rel="prev" href="{f:uri.page [...]}" />
    </v:page.header>