[ic] Specify flypage using javascript or another non-database method

Gert van der Spoel gert at 3edge.com
Sun Jun 28 19:48:27 UTC 2015


>>> > I got around to trying this finally. In my global directory I 
>>> > created is_mobile.tag containing:
>>> > 
>> [snip]
>> 
>> Something else you might be interested in:
>> 
>> https://github.com/perusion/interchange-extras/tree/master/mobile
>> 
>> --
>> Josh Lavin
>> Perusion -- Expert Interchange Consulting    http://www.perusion.com/
>> ... ask me about job opportunities ...
>
> I'm making some progress but having an issue getting this to fully work.
>
> I added the code from
>
https://github.com/perusion/interchange-extras/blob/master/mobile/i/usertag/
is_mobile.tag
> into a file named is_mobile.tag in my global directory which in included
from my catalog.cfg. I also added
> 
> Autoload [handle-mobile]
>
> to my catalog.cfg and restarted IC.
>
> I can tell the is_mobile code works because I added to my
pages/index.html:
>
> [is_mobile]YO[/is_mobile]
>
> and I indeed see YO if I visit my page from a phone or use a browser
plugin to change my user agent string.
>
> But the automatic redirects don't seem to work. I have a directory pages/m
and in there I have index.html and flypage.html. Both of these pages load as
expected if I directly visit domain.com/m/index.html or
domain.com/m/flypage.html
>
> If I add to my pages/index.html:
>
> [is_mobile]
>  [bounce page="m/[var MV_PAGE 1]" status="301 Permanent Redirect"]
[/is_mobile]
>
> that works. If I add to my catalog.cfg:
>
> Specialpage flypage m/flypage
>
> that works. I also tried Mike's simpler version from
http://www.icdevgroup.org/pipermail/interchange-users/2015-April/054897.html
> but that also doesn't work. If anyone has ideas to help me debug I'd be
grateful.
>
> DB

In the github code I see logDebug lines, have you uncommented those to
actually see those values written in the log as well? That would give me
more a feeling that 'it works'  than printing of 'YO'.

Other than that I don't have any ideas, it's late :)

CU,

Gert



_______________________________________________
interchange-users mailing list
interchange-users at icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users




More information about the interchange-users mailing list