Duncan Lock of
www.codeistry.com helped me out on one of my first projects, and he enlightened me greatly. It is okay to use multiple templates, in fact, a lot of projects will call for it. Basically, you’ll be best off using a new template anytime you want to display information in a different way.
What you do to only maintain the code base in one spot is to use chunks for basically everything; this way, you only need to edit anything in one place. For instance, here is an example:
{{dtd}} <!-- chunk with Doc Type Definitions, in use throughout site -->
<head>
{{metatags}} <!-- insert the call for the metatags; I use different fields to fill these in -->
{{favicon}} <!-- inserts code for the favicon -->
{{title}} <!-- inserts the code for the title tag -->
{{styles}} <!-- main stylesheet call -->
<!-- if I was building a new template that needs new calls, just insert a new chunk here -->
</head>
<body>
<div id="wrapper">
{{header}} <!-- inserts the header html -->
{{navbar}} <!-- inserts the navigation -->
<div id="rightbar">
{{threesteps}} <!--inserts a design piece; one of my other templates doesn't call this chunk -->
{{maincontent}} <!--inserts the main content html and the call for the [*content*] TV -->
{{credit}} <!--inserts the call for the credit line -->
</div>
<div id="leftbar">
{{leftpics}} <!-- inserts the call for the pictures on the left side -->
<!-- let's say I wanted to add in more content in the left bar - insert a new chunk here! -->
</div>
<div class="clear"></div>
</div>
</body>
</html>
Using this method, you can have as many templates as you like, and only edit in one place if you need to change something.
Alternatively, you can do as photowebmax said - use TVs to either call chunks or not. I have a design where I add or subtract stuff from the right sidebar based on how much content is on the page - I simply have a bunch of radio button TVs at the bottom (or maybe it is checkboxes, I don’t remember) that I use to add or subtract the pieces.
Another option would be using PHx (I think). I don’t know so much about this, but you could build the one template with a textarea TV at the bottom (or a rich text area), and then in your template it would go something like this (again, I don’t know PHx, so you would need to research to get the exact method of writing the code out - this is to give you an idea):
[+phx:your_tv_name_here:isnot=``:then=`your_chunk_name_for_the_two_columns`:else=`your_chunk_name_for_one_column`+]
I don’t know PHx syntax, but you hopefully get the idea. This method would be pretty nice, because then MODX would know automatically whether to display 2 columns or 1 column, based on whether you fill out the TV.
If you try out using multiple templates, you may find it works very well. This way, when you use a 2 column template, you’ll have the TVs at the bottom for your 2 column content input, and when you are using a 1 column template, you will only have the main content area to fill out. Play around, experiment, have fun - figure out what works best for you.