Hi,
I have different kind of pages (ayurvedic school):
- Some page will describes trainings
- Some pages will describes Practicionners[b]
- Some pages will describes [b]Teachers[b]
- ...
- Some pages will display formatted result list of a Ditto call
So I found that having different templates for each type of content is very useful. So I can attach different TV. I created the following templates:
- [b]trainings - Display training content with specifics TV (date of the training, price, diplome, ...)
- practicioner - Display practiconner content with specifics TV (name, phone, picture, website, ....) ...)
- ...
- Default - To display ditto result (they are formatted using their own chunk
I’am very happy with this system, but
I always need to copy/paste from an initial template (the default one). And in fact very few changes between the template.
What I do want, is to be able to have multiple template because it give me the possibility to assign different TV for different type of content. Also it allows me to format them.
But it will be nice to maintain only one physical template, something such as :
Common part of the template
<div id="summry">
if (template=="training") insert training-summary-chunk-language
else if (template=="practicioner") insert practicioner-summary-chunk-language
else ...
</
Common part of the template
Any ideas for that ?
Modx 0.9.5 beta5