User Tools

Site Tools


Sidebar

how_this_software_works:pages_templates_modules:templates:start

Templates

Templates are used to display your site’s content to visitors. This software comes with several default templates that can be used "as is", edited to your liking, or replaced with your own HTML templates. We recommend that you not delete any default templates until you have your site completely set up and working properly.

So what is a template? A template is made up of HTML code (from open HTML tag to close HTML tag) just like any other page on the Internet. It contains the overall page layout, graphics, and assigned modules (explained later) that will be displayed on your site. You can assign a different template for every page on your site or use the same template over and over for every page.

The reason why you can use the same template for multiple pages is simple. On a standard web site you will typically have a header, side menu bar, footer, and then a "content area" that you will use to put the content for that page. In this software you can use exactly the same format. However, in the "content area", instead of actually putting your own content, you will place the following tag exactly as it is shown here:

{body_html}

What this tag does, is call to the database and pull the applicable information (dynamic data) that is tied to that specific page. Quickly review the default templates that came with your program to see where this tag is used in each of them. It’s as simple as that! As long as you have the {body_html} tag in your template, the software will take care of the "content area" for that page.

For example, when a visitor browses the "Search Page", this software recognizes which page they are on, and displays the dynamic "search" content wherever it sees that the {body_html} tag is located within that page’s assigned template. That very same template can also be assigned to the "Login Page", "Registration Page", and every other page for that matter. All the software cares about is to search the template, find the {body_html} tag, and replace that tag with the correct content for that particular page1). .

It is important to understand that the dynamic content which is displayed by the {body_html} tag is pulled directly from the database. We want to make the distinction between the {body_html} display properties and PAGE MODULES display properties. {body_html} properties (settings, text, fonts, etc.) are all controlled by those settings you have made within the Site Setup Menu, as well as the other menus in the admin. PAGE MODULES properties, on the other hand, are controlled entirely by their own individual settings within the PAGE MODULES menu. So, when you want to make a change to a setting on your site, you must first determine whether you are working with a {body_html} feature or a specific PAGE MODULE.

After you have created your templates you will assign them to each page. Template assignment is done by simply accessing the DESIGN > PAGE ATTACHMENTS menu and editing the appropriate page. Once there, you will see the default template assigned to the page, and then the ability to assign additional templates on a category by category basis.

<tip c h>Tip: By default, the software is delivered to you with a template assigned to every page. If you want to implement your own design, you should consider "overwriting" our template html with your own. That way, your template design will take effect wherever we have already assigned that template across the pages of the software.</tip>

1)
Technically speaking, that explanation is totally inaccurate, it is a lot more complex than that. But the end result is that the {body_html} does get replaced with the contents that are meant to display on that page.
how_this_software_works/pages_templates_modules/templates/start.txt · Last modified: 2018/09/02 16:11 by willhicks