We are about to start the development of a mobile version of our current web site that will consist on publishing the same content adapted for mobile devices, so we would appreciate some advice if you have done something similar before about how to set up the “new” site.
We can only think of two options, the first one would be creating a new “rhythmyx site” pointing to the same folder root so we can explicitly set a new global template for it, also have 2 “default” templates per content type (one for each site).
The second option would be to do not create a “mobile” site and specify each of the new templates to use the “mobile” global template.
Has anybody done anything similar before? we also need to work out which option would work better with our snippets templates ( since for some them we will also need a “mobile” version…
I built a working prototype for our site. We use PHP to determine whether the consumer is mobile or web then apply different style sheets to the page. The benefit is that you only need to publish one version of the page and let PHP determine the look for the different devices. Obviously you will need to have clean HTML to begin with and may have to add some DIV’s here and there but it’s doable. Here is an example of the PHP I use:
<?php
include($_SERVER[‘DOCUMENT_ROOT’]. “/resources/php/Mobile_Detect.php”);
$detect = new Mobile_Detect();
?>
<?php
if ($detect->isMobile()) {
echo (Link to mobile stylesheet)
}else{
echo (Link to normal stylesheet)
?>
Thanks for your idea but I’m afraid it will not quite work for us since we intent to publish our content on a completely different markup, so tweaking the CSS will not be enough.
Does anybody has any other recommendations or ideas? They do not necessarily have to be for a mobile web site but just a site been published with two completely different formats or layouts.
Because of the way in which we are using Rhythmyx (think mass hosting with close to 200 unique sites), we decided that we could not afford to incur the wrath of publishing if each of those sites needed to be published twice (once for regular and the other for mobile…not to mention trying to deal with default templates on two different publishing sites for the same content). Hence, we settled on an intermediate script that parses through the published page and delivers the content in a mobile friendly version on the fly. We were briefly considering running a job that creates this mobile friendly version after each publishing run but decided that the cost of running this job on every site far outweighed the current mobile usage (we may revisit this in a couple of years).
The script can figure out based on the publish page what content type it is and what field (with div ids or classes) to expect. It then takes this content and strips away the rest of the…extraneous information…to deliver a slimmed down version of the page (with calls to its own mobile css and js files).
I greatly dislike the automatic forwarding of websites to a mobile friendly version (my browser on my phone can render the page just fine thank you very much…If I want to view a stripped down site, I want to have control over going there…) so that wasn’t an option for us.
Allot of folks use dispatch templates to handle the template selection. This is the kind of thing that dispatch template’s are great for. In terms of the new site definition, you will need that if you are publishing to a separate site like m.yourdomain.com, as you are pushing to a different publish target with a different location scheme etc.
I did not like much the idea of using dispatch templates because that would mean to have 3 templates for each content type ( the dispatcher + mobile and non mobile version), and since you can have a default template on a per site basis ( and a different global template) I thought that would do the trick.
On 6.7 you can have different context’s for assembly and delivery so the scheme locations should not be a problem regardless of which option we choose.
Hi Jitendra, thanks too for your thoughts on this, your approach seems quite sensible but developing an script like the one you described seems to be fairly complex, also we do aim for a Rhythmyx based solution, besides that we will have a though about it.
Any more thoughts on this? does anybody uses a purely Rhythmyx based solution to publish two different versions of a site?
Javier,
You are correct, you can specify templates and define global templates per site. One of the problems that you may run into is when you want to create multiple formats for a single content item (think rss feed + full page)…however this may “just” work… We also didn’t want to have to deal with managing site-template visibility across all those sites.
The script itself isn’t that complicated because you should know the format of the published page…but ymmv.