I have to replace a marker on my typo3 page using typoscript to build a link to another page (i.e. another type of the same page).
For this link, I have to set the same query parameters as the current page, plus the page Id of the current page, for example <a href="index.php?id=11¶m1=abc¶m2=def&type=123">
What I have so far is to pass the QUERY_STRING as received to the following site. The problem arises when the current page's path has no id
parameter, e.g. set by RealURL.
so what I need is a mapping like this:
mysite.com/about_us
==> mysite.com/index.php?id=11&type=123&L=1
mysite.com/index.php?id=33¶m1=abc¶m2=def&L=1
==> mysite.com/index.php?id=33¶m1=abc¶m2=def&L=1
this is what I tried:
page.10.marks.printlink = HTML
page.10.marks.printlink.value = dummy
# For plugin pages with querystring
page.10.marks.printlink.value.data= getIndpEnv:QUERY_STRING
# For other Typo3 pages
page.10.marks.printlink.value.ifEmpty.data = page:uid
page.10.marks.printlink.value.ifEmpty.dataWrap = id=|
page.10.marks.printlink.value.wrap = <a target="_blank" href="index.php?|&type=123">print</a>
This works for most cases, but not if a RealURL PREVar is in place, in which case the following is mapped:
mysite.com/de/über_uns
==> mysite.com/de/index.php?L=2&type=123
So, no id is passed! (presumably because RealURL replaces the /de/
prevar by L=2
, but doesn't set the id
)
My question is: is there a way to simply concatenate the page:uid
and QUERY_STRING
? Or do I have to do some more typoscript magic?
Thanks for any hints!