Each document type needs a template if the information stored in it
is to be displayed as a webpage. The template contains all the HTML
markup, as well as the fields contained within your doctype.
Its possible to have many templates for the same doctype. I'll give you an example.
I have a website that sells cars.
A
document type on that website is "car information". this doctype
contains such things as, price, make, model, miles on the clock,
colour, mpg etc.
I create many pages on my site using that
document type. One page for each car I'm trying to sell. However, I
want to differentiate between the way I display different types of car.
I want all my classic cars to have a classic page design, all my
Mustangs to have a fiery page design and so on.
So I create
various templates for my "car information" document type, and give them
names like "car_mustang" or "car_new_year_sale" or "car_classic" etc.
Then
I look through the "Allowed templates" dropdown list on my document
type and select all the ones that I've created. Now, whenever I create
a new piece of content using this doctype, I can pick which template I
want to use on that particular page.
Most of the time I'll
probably want to use a specific template, "car_standard_template" for
example. If I find I 'm using that template a lot I can set it as the
default using "default template". Now any content I create using this
document type will automatically use that template.
What is the property 'Allow template' and 'Default template' of a document type used for?
Please help.
Nam.
Each document type needs a template if the information stored in it is to be displayed as a webpage. The template contains all the HTML markup, as well as the fields contained within your doctype.
Its possible to have many templates for the same doctype. I'll give you an example.
I have a website that sells cars.
A document type on that website is "car information". this doctype contains such things as, price, make, model, miles on the clock, colour, mpg etc.
I create many pages on my site using that document type. One page for each car I'm trying to sell. However, I want to differentiate between the way I display different types of car. I want all my classic cars to have a classic page design, all my Mustangs to have a fiery page design and so on.
So I create various templates for my "car information" document type, and give them names like "car_mustang" or "car_new_year_sale" or "car_classic" etc.
Then I look through the "Allowed templates" dropdown list on my document type and select all the ones that I've created. Now, whenever I create a new piece of content using this doctype, I can pick which template I want to use on that particular page.
Most of the time I'll probably want to use a specific template, "car_standard_template" for example. If I find I 'm using that template a lot I can set it as the default using "default template". Now any content I create using this document type will automatically use that template.
Wow, I got what you mean Shaun. Your explanation is very clear!
Thank you ^_^.
Nam.
@Nam Gi VU: When your questions is answered compeletly you can mark the answer from Shaun as a solution, so this thread will be marked as solved
Thomas
is working on a reply...