[TYPO3-english] How can I fix this link on my Powermail submit page?

Oliver Salzburg oliver.salzburg at googlemail.com
Thu Aug 2 18:57:41 CEST 2012


This has been bugging me the whole day. I'm trying to place a link on
the submit page of my powermail setup.

You'd think this is a simple task, but bear with me.

My Powermail form has 2 hidden fields which are prefilled with a page
ID and a page title. This is the page I later want to return to after
having sent the mail. By putting these values in the form, I hoped to
have access to them whenever I need them in the process.

1. Approach
-----------
Given that you can use ViewHelpers now, I though, great, let's use the
PageViewHelper, like so:

{f:link.page(pageUid:'{backto}')}

But where does my link text go? More inline notation to the rescue!

{backtotext -> f:link.page(pageUid:'{backto}')}

But now, I have a > in my RTE. Which is stored as > and, thus, breaks
the parsing of that expression.

I thought I was smart by simply using:

{f:link.page(pageUid:'{backto}')}{backtotext}

But this leaves the <a> tag open, which has very undesirable effects...

So - No link for me!

2. Approach
-----------
So I thought I would simply construct the link in TypoScript and render
it on the page via

{f:cObject(typoscriptObjectPath:'lib.myBackLink')}

But I can't see any way to access the variables from the (sent)
Powermail form in TS. So I don't have access to the page ID or title.

3. Approach
-----------
So I thought, if the default PageViewHelper only wants to render its
children as its content, maybe I can roll my own ViewHelper that
accepts the content as a parameter!

But how would I make that ViewHelper known to the system so that I can
use it in my customized Powermail templates?

I've only used Fluid inside of my extensions before. It was obvious how
Fluid would look up the correct ViewHelper by name, by what if I want
to use a ViewHelper in my fileadmin folder hierarchy?

Kind regards
Oliver


More information about the TYPO3-english mailing list