0
votes

I'm using TYPO3 newsletter extension and I'm looking for a solution not to display the link to the web view again when the web view already is shown.

newsletter is an extension that makes it possible to send pages as an email. If the users clicks on the link in the email, a browser window opens with a web view of the newsletter. I want to avoid the redundant display of this link.

In my newsletter fluid template i've got the following line:

###:IF: newsletter_view_url ###<p>If this e-mail cannot be display correctly, please click <a href="###newsletter_view_url###">here</a>.###:ENDIF:###</p>

The placeholders are delivered exclusively by the extension, so they are - as you see - no typoscript vars. The problem is: newsletter_view_url is always filled with a value and also the other possible vars always take the same value in email view as well as in web view.

What i tried so far:

Assign some var to the fluid template to distinct the web view from the email view:

# Create a Fluid Template
page.10 = FLUIDTEMPLATE
page.10 {
  # Set the Template Paths
  partialRootPath = {$privateTemplatePath}Partials/
  layoutRootPath = {$privateTemplatePath}Layouts/
  variables {

    controllerAction = TEXT
    controllerAction.data = GP:tx_newsletter_p|action

  }
}

and in the fluid template file:

<f:if condition="{controllerAction}"><p>If this e-mail cannot be display correctly, please click <a href="###newsletter_view_url###">here</a>.</p></f:if>

Problem: controller action does not take any value though it is set in the get-string while opening the url from the newsletter:

test.html?type=1342671779&tx_newsletter_p%5Bc%5D=a0648d94a22dd5928762b1bd5f82e9de&tx_newsletter_p%5Baction%5D=show& ...

It also does not work if i use controller action for a typoscript condition

controllerAction = TEXT
controllerAction.value = 1

[globalVar = GP:tx_newsletter_p|action = show]
     controllerAction.value = 0
[global]

I would be very grateful for further inspirations! Thank you so much!

1

1 Answers

1
votes

According to this feature request, it is not implemented yet: https://github.com/Ecodev/newsletter/issues/19

I suggest contacting author and submitting pull request with this change. As of how to implement it, might be changing the PHP code to add custom parameter to the URL when viewing in browser which would hide any part of newsletter template.