viewer urls for mobile
5 posts by 4 authors in: Forums > CMS Builder
Last Post: January 12, 2011 (RSS)
By Maurice - January 12, 2011
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
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: [Jason] viewer urls for mobile
By Maurice - January 12, 2011
but thanx for the reply
Dropmonkey.nl
Re: [Maurice] viewer urls for mobile
By Damon - January 12, 2011
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.
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
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