-
- 119 Posts
Actually I'm not sure how MODx handles this now, but a major feature add is to apply different templates to different types of pages. The end result is the same content (or some variation/selection of content) in a different look and feel. My main use for this is usually with printer and WML (or other XML) versions of pages. So, do we have a way of accomplishing this now that I'm not aware of? And if not, any thoughts on how to approach? Ideally I think the variant version of the page should be a whole new page rather than pass a parameter to it:
press_release_printer.html
as opposed to:
press_release.html?version=print
-
- 1 Posts
I always do this using CSS:
<style type="text/css">
@import url('/assets/site/default.css');
@import url('/assets/site/infoclipper/style.css');
</style>
<link rel="stylesheet" type="text/css" media="print" href="/assets/site/infoclipper/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/news.xml" />
My /assets/site/default.css file includes all of the CSS elements that site features need (for instance, my media browser or the message boards), while /assets/site/infoclipper/style.css contains the information for the particular theme.
The browser then automatically uses /assets/site/infoclipper/print.css when the print button is pressed.
Assuming you are using a full CSS design, this has the potential of doing completely new layouts for print.
As a final touch, I generally apply a stylesheet for the XML feed as well.