[TYPO3] Print link: how to toggle link parameters rewritten with RealURL
Paul Vetch
paul at qedstudio.com
Fri Jun 16 12:49:54 CEST 2006
Hi there,
I'm having a problem getting my parameters to behave.
I have a templavoila site, and I'm running Realurl. I've modified
TemplaVoila so that I can have two additional views: a print view and a
hi visibility view.
All I'm trying to do is make the function to toggle the views work with
RealURL.
What I want:
http://www.website.com/my_page/ - normal view
http://www.website.com/my_page/print.html - print view
http://www.website.com/my_page/textonly.html - alternate view
What I've done:
* config.linkVars is set to print,textonly;
* RealURL is working fine and is setup to see both print and textonly
variables and write them as filenames when it does;
* I've created two functions to generate realurl typolinks and append
the appropriate variables.
Problem:
* I cannot find a way to toggle the parameter off!
My TS (for the textonly link)
lib.hiVisURL = TEXT
lib.hiVisURL.typolink {
parameter.data = TSFE:id
useCacheHash = 1
returnLast = url
additionalParams = &textonly=1
}
[globalVar = GP: textonly = 1 ]
lib.hiVisURL.typolink.additionalParams =
[global]
Trouble is, leaving additionalParams blank doesn't (wishful thinking)
strip the &textonly parameter off the realurl path. And also,
returnLast = url continues to return
http://www.website.com/my_page/textonly.html - so once the textonly mode
has been toggled, there's no way to escape.
I've tried clearing the lib and remaking it, but I can still only get
hold of the RealURL with the parameter in place.
I need to know how to get hold of the realurl path of the current page,
*without* the textonly parameter, in the globalVar statement. I've had
a look around and seen mention of a hypothetical
.addQueryString.removeParams method, but it doesn't seem to exist yet.
Can anyone help...
More information about the TYPO3-english
mailing list