[TYPO3] real url + set and remove parameter
Dmitry Dulepov
9f4eetb02 at sneakemail.com
Thu Feb 22 15:05:10 CET 2007
Hi!
PEF wrote:
> My website uses two templates - one for normal view and one for
> text-only view. When viewing in normal mode, I want a button to switch
> to text-only-mode and vice versa.
>
> At this point I've got my buttons, but the urls aren't correct:
> - in normal mode:
> - http://www.domain.dk/om-denne-side/?alt=1 (ok)
> - in text-only mode:
> - http://www.domain.dk/alt/om-denne-side/?alt=0 (not ok)
>
> In the latter, the alt-param following the domain, prevent the mode from
> returning to normal-mode, despite the &alt=0.
>
> Further more: It would be nice, if the two links looks like this:
> - http://www.domain.dk/alt/om-denne-side
> - http://www.domain.dk/om-denne-side
>
> In the real-url-section:preVars of localconf i've added this:
> array (
> 'GETvar' => 'alt',
> 'valueMap' => array (
> 'alt' => '1',
> '' => '0',
The line above will work only and only if you have url that looks like
"/?alt=" (i.e. "alt is set to empty). This will not work if "alt" does
not exist in the url. This is your mistake :) You need to use dafault
value for this var and set it to 0.
--
Dmitry Dulepov
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)
More information about the TYPO3-english
mailing list