viewer urls for mobile

5 posts by 4 authors in: Forums > CMS Builder
Last Post: January 12, 2011   (RSS)

By Maurice - January 12, 2011

Hi it team,

Playing around with cmsb and was wondering.

i made a standar cmsb site but i added a mobile detection script that redirects my site to a mobile and tablet version

so i have 3 templates but got tangeld up with the viewer urls how can i use multiple templates but i can only add 1 set of viewer urls???

is there a solution for that??

Greetz Maurice
-------------------------------------------

Dropmonkey.nl

Re: [Maurice] viewer urls for mobile

By Jason - January 12, 2011

Hi Maurice,

CMS Builder is set up to only have 1 set of viewer urls per section. Since mobile/tablet versions are a display issue, you could try using only 1 template and then change your CSS depending on the device connecting to it. You can also limit which fields you output from the CMS.

Another solution would be to do the redirect to the other pages from within your .php page.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Maurice] viewer urls for mobile

By Damon - January 12, 2011

What about manually creating the viewer urls in your templates for the mobile site.

So instead of using the automatic view url variable you would create the link by putting together other record variables to create the link:
ex. mobile_detail.php?record_name-record_number

Is this makes sense and sounds like an option, let me know and I can post some example code.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Maurice] viewer urls for mobile

By Kenny - January 12, 2011

This can be done pretty easy by appending the URL is the code.

Say you have news articles and you have set your viewer urls to:

/news/index.php
/news/article.php

Then in your code you have something like this:

<a href="<?php echo $record['_link'] ?>">Read More</a>

Well, if you use a browser detection script that redirects mobile users to your mobile site, then you can use the same code by adding the directory in which your mobile site is kept. We set one up where the mobile site was kept in the folder "mobile" so now I would just put

<a href="http://www.yourdomain.com/mobile<?php echo $record['_link'] ?>">Read More</a>


Make sense?

Kenny