Forward sorry for my english.
’m Using modx for a two days and cannot understand how can I use one template into another.
For example: I have a website where base template contain Content-Area.
I need base template to keep unchanged for every page, but Content-Area templates must be selective for every page.
I tried to use Chunks ( {{beginChunk}} my internal template {{endChunk}}), but is there more original and right way to get what I want?
Because I think there is no good way - to save Template-bits in the Chunks.
Working they way you are explaining would cause your code to most likely not validate, and cause page render errors. What you need to do is learn how CSS works. Within the same template and proper coding you can make your content appear as if it is a totally different site. example;
<div class="content.main">
<div class="content.framed">
By specifying radically different styles for different instances of common elements you can get it done.
There are many good sites to show you how to do this. I do not have the links handy but I’m sure someone does...
Good Luck
The trouble is not about CSS!
Look:
I have a website based on a base template X, for example it looks:
[____header____]
[ ]
[ ]
[ contentarea ]
[ ]
[______________]
[ footer ]
fig.1
In content-area i want to feel documents with different-kinds (different templates) like a simple content, realty objects, or news block.
I look it was simply if i could set BaseTemplate (like a fig.1) for templates "simple content", "realty object", "news block" and in BaseTemplate describe placement (contentarea) for a subtemplates.
Now I must dublicate header and footer information in every template I use (or using Chunks). But i think: Chunks idea is not to be template-bits storage!
Question: could I describe position in base template for another templates Or what is the right way to use modx for my task?
Thank you chenesedream! That is a realy way!