What are templates and how do they work?
Templates are rather like blueprints. They contain the raw structure and
appearance of a webpage, but lack the actual page data. They are used to create
pages - and as such, they should never be referred to directly.
Each template contains three types of information:
- HTML, which determines the page structure and appearance.
- 'Template Cells': sections of page code used to output chunks of content,
depending on the type.
- 'Placeholders': special tags used to insert data from specific database
fields. These enable you to uniquely pinpoint information already inputted
into Auto Manager and place it in your page.
Auto Manager uses these templates to create the actual HTML web pages.
For instance, when you create a new listing, Auto Manager feeds the listing
information into a template, then creates an actual HTML document out of it and
stores it on your server. The benefit to these templates is that page styles
and structures only need to be set up once - afterwards, every page using the
template will be produced to look alike. Additionally, since they are coded in
HTML you can use any HTML/text/WYSIWYG editor (such as Dreamweaver, Frontpage
or GoLive) to easily modify them.
Why does Auto Manager create static HTML pages, and not dynamically
create them?
For one simple reason: speed. If every page on your site was created 'on the
fly', your site would run a lot slower. Putting together dynamic pages requires
your server to be actively involved - it has to put together each page again
and again, and this uses up a lot of its resources. So instead, Realty Manager
creates static HTML documents which can be retrieved quicker!
What templates are there?
Auto Manager comes with six default templates, each stored in the
/templates/_auto/ directory. Here's an overview of what each one is used for.
_publish_homepage.html
This template is used to create a separate page for each user account set up
in Auto Manager. This page, by default, contains all the information about
that user and up to 10 different photos.
_publish_homepage_index.html
This is used to create an index of all user accounts in Auto Manager. The
page displays a summary and link to the individual homepages and an optional
picture.
_publish_listing.html
This template is used to create an individual html page for each listing
created in Auto Manager. Each listing page can have up to 10 images as well
as all the data for that particular listing.
_publish_listing_index.html
This template is used to create an index of all the user homepages. This
page contains a summary of each listing, with a link to the full details page -
created with the _publish_listing.html template.
_search_query.html
This is used to create your search page. It provides the search criteria
available to your website visitor. You can fully customize this page to allow
searching by whatever database field you want; even those fields that you
yourself create!
_search_results.html
This template is used to display the results found by the search engine.
By default, this template displays a brief description of each listing, with
an optional image and a link to the full listing page. However, like all the
templates, you have control over what information is presented in the page.
Also, take a look at our
online documentation on the templates. This is a handy reference page,
containing information on both the templates themselves and
the placeholders and template cells available within those pages