Quote from: pleth at Jun 28, 2009, 08:05 PM
One of the ways I have approached this is to use a snippet like the one below:
$TempId = $modx->documentObject['template'];
if ($TempId=="1")
$output="{{homeContent}}";
elseif ($TempId=="2")
$output="{{template2Content}}";
else
$output="{{template3Content}}";
return "$output";
It allows you to call in different chunks based on which template is used. You can then use CSS to style the columns (even using a similiar snippet to call in different CSS). When I use this approach I get by with using the same HTML across multiple templates all of which are driven form a single source of HTML code.
The templates are not truly different, but you can hang different template variables and call ins on them.
One of the point of using a CMS is not to use code. Off course you have to do it for complicated things but in this case that’s what the templates are for.
Cheers