Different Template for different edition

We plan to generate the mobile site for one of our sites. We would like to use the same content items, and just generate using a mobile template. The complexity is that the client would like to generate the mobile version for only 15 pages, out of 1000 pages that we have currently live. However, these 15 pages will have internal links that will link to pages that will be published with the normal template.

My design is to have a field in the page content item that will decide whether it should be published as a mobile page or as a normal page. There will be a new dispatch template. In this dispatch template, it will check the mobile flag, and then either dispatch to the mobile or the normal template. Then there will be a new edition specific for the mobile site. This edition will publish all the item content items (1000+) under the location /mobile. So basically, we will end up having a duplicate tree of pages under the mobile/ folder.

How does this approach sounds? The problem is that how can you enforce the same page content type to use the new mobile dispatch template if it is the mobile edition running, and then make the normal edition to use the current normal page template?

thanks
Manvinder

Did anyone tried to publish same content type using 2 different templates tied to 2 different editions?

I would probably set up a “mobile” content list using the mobile template, selecting content using your field - something like:

where rx:mobile_publish_field = "yes" 

A second content list for “no” using the normal template to publish the other 1000 pages. Then use the two lists in the “mobile” edition.

Is there a need to answer how content items in the mobile publish generate links to other content items in the mobile publish since I imagine managed links will resort to using the default template that may not be the mobile template?

Yes…that is the problem. Unless there is a way that we can tie up a separate template to each of the editions for the same content type. The other problem being that if I put the conditional block to check the mobile_publish_field, then when we publish for the normal site, it would publish the mobile version as well…

So we are back to the same problem, how to specify a different template for each of the edition (mobilepublish_edition, normalpublish_edition) for the same content type.

So just to recap what you want,

  • you will have 15 “mobile friendly” pages that may or may not link to the 1000+ other pages.
  • you want to make sure that the links in between each of the 15 “mobile friendly” pages do not link to the “normal” page template of those items.

Question:

  • if someone goes from the mobile friendly page to the “normal” page of another item, if there is a link in that page to the “normal” page of the mobile friendly page, what should happen? Should it go to the “mobile” or “normal” page?

If that is the case, then you may need to look at adding a context in addition to content lists…

Thanks Jitendra about mentioning the context. I think by using a different context for the new edition, we can specify that the new edition to use a different template, than the normal template.

I was thinking about this approach:

Create a new edition called Mobile_Full_Edition
In the content list for this edition, pull all the content from the Site.
Create a new context
Add to the new context a new location scheme for the page, and in this location scheme use the mobile specific template
Duplicate the existing page template, and in the new page template use the mobile_true flag to determine whether to use mobile code, or normal page template code.
First run the Normal_full edition
Second run the mobile_full edition
Mobile_full will publish all the content under the /mobile folder which is directly under the normal site.

Do you see any issues with this approach?

Thanks
Manvinder