[TYPO3] adding to query string
bernd wilke
xoonsji02 at sneakemail.com
Thu Jan 31 23:28:42 CET 2008
on Mon, 28 Jan 2008 19:53:31 +0100, Francois Suter wrote:
> Hi,
>
>> I have an external redirect (http://) set up for the home page that
>> writes the additional parameter to the query string (which I then test
>> with a series of conditionals). However, the links within the page
>> that is rendered loses the additional parameters (makes sense). So, how
>> does one tell T3 via TScript (?) to include additional query
>> parameters?
>
> TypoScript, yes. Try:
>
> config.linkVars = brand
be aware that all pagecalls with this url-param normaly are cached. And
somewhen an idiot is trying to hack your site and will call your pages
with something like: ?&brand=http://www.trymypage.org
every visitor of your page will get this parameter injected, since on the
first call (after cache-clearing) the page is generated with the actuall
value from brand attached to every link on the page (and the same on all
pages called from there)
first you need to differ the differnt values for caching, second you need
to reduce the variability to some values which are really needed.
1. make a condition on this url-param somewhere in the typoscript
2. look into TSRef-Manual Chapter 7.3 "config"
as you may use another linkVar at another place in your typoscript (e.g.
L for language), use:
config.linkVars := appendString(brand) (documentation:
http://typo3.org/documentation/document-library/core-documentation/
doc_core_ts/4.1.0/view/1/2/ )
Bernd
--
http://www.pi-phi.de/t3v4/cheatsheet.html
More information about the TYPO3-english
mailing list