[TYPO3-english] tt_news: Additionalparams not working with ext_url ?

Bernd Wilke t3ng at pi-phi.tk
Thu Dec 8 11:15:56 CET 2011


On Thu, 08 Dec 2011 10:16:11 +0100, Søren Madsen wrote:

> I can see that this question has been posed a few times before, but is
> left unanswered - but I'm crossing my fingers that somebody can answer
> this:
> 
> I'm trying to attach parameters to news records of the type ext_url with
> the following:
> 
> 10.2 = TEXT
> 	10.2 {
>             field = title
>             wrap=<strong>|</strong><br/>
>             stdWrap.typolink {
>               parameter.field = ext_url
>               additionalParams =
>               &utm_source=typo3&utm_medium=email&utm_campaign=
{page:title}
>               additionalParams.insertData = 1
>             }
>          }
> 
> (This works fine if parameter.field = page or regular tt_news record
> item)
> 
> Can someone explain to me why - and/or even better answer the question:
> How do I attach parameters to external URL's from tt_news records?
> 
> Thanks in advance.

I would wrap the URL direct. something like:

{
  field = title
  wrap=<strong>|</strong><br/>
  stdWrap.typolink {
    parameter.field = ext_url
    parameter.field.wrap = | 
&utm_source=typo3&utm_medium=email&utm_campaign=
{page:title}
    parameter.field.insertData = 1
  }
}

the problem that may occur:
you don't know wether there is already an questionmark in ext_url.
if you know: "yes, always" use like above
if you know: "no, never" insert a '?'
otherwise: ???? I don't know. 
there is no strpos() or contains() for the if-wrap. maybe a userfunc.

bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list