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

DB db at m-and-d.com
Sun Jun 28 17:43:06 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





More information about the interchange-users mailing list