Help - Search - Members - Calendar
Full Version: Doubt about templates..
Movable Type Community Forum > Using Movable Type > Templates and Tags
mattrobs
I have yet to try MovableType, so I decided to ask this question and save myself the hassle of installation.

I am unsure how the templating system works.

For each aspect of your site (like posts page, archives page, comments page) do you create a seperate template for each?

Does each template have to contain a full page (from the < HTML> to < /HTML>)? Or can it be parts (like only the post table, or body text)

If that is so, what if I wanted to change something non-css related in my site. Would I have to go through every single template and repeatedly change each one?

Clarification welcome.
maddy
QUOTE (mattrobs @ Dec 5 2004, 07:02 PM)
For each aspect of your site (like posts page, archives page, comments page) do you create a seperate template for each?

Here is a good run down of the basic templating structure: What Do All These Templates Do?

QUOTE
Does each template have to contain a full page (from the < HTML> to < /HTML>)? Or can it be parts (like only the post table, or body text)


No, they don't. They do by default, but you are free to modify/add/delete the templates as you wish, adding whatever HTML or MT tags you wish for whatever your purpose. smile.gif

QUOTE
If that is so, what if I wanted to change something non-css related in my site. Would I have to go through every single template and repeatedly change each one?


Possibly. It would depend how you'd set your site up, basically. In addition to Index Templates, and the like, you can also create Template Modules. You can then easily include the contents of these modules into other templates (meaning on the module needs to be updated with your changes). As you can have MT output whatever templates you like, you can also use MT generated content for PHP and other types of server-side includes. smile.gif

For more information about Templates, Modules, and MTInclude (a tag to include modules and even files), see the User Manual.
bruce21
On my own site, I have three templates that I use that came with the installation. There are five (basically). They create all your pages for you and come with the installation. No need for you to make anything.

Main index template-main page of site.
Category Archive Template-Archives by category, a listing of articles in each category on a separate page.
Individual entry Archive-creates all the individual pages, each entry is written to a separate page. New pages are created and linked to sitewide by movable type.
For those who wish to, I don't, there is also a date based archive template, creating archives by date, and a main archive template which can be used as a site map if you like.

For example, if you wanted to change something on all your pages (individual ones), all you would have to do is change the individual entry template, and the changes would be written to ALL your pages on rebuild.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.