Templates
Overview and Organization
What Are Templates?
Templates (in conjunction with the .css stylesheets in the media section) define your site's look and feel. Administrators and HTML producers will usually create and maintain the templates. If you are not comfortable working with HTML, the templates are probably not an area you should work in.
All templates' names end in ".tmpl".
Which Templates Are Used By Which Stories?
There are almost 200 templates in ARCOS, so at first glance the template system can seem daunting—but for the most part, there are very few templates that you will ever need to edit.
The main, master template for your site(s) is named category.tmpl. It is where the majority of the HTML comes from for most pages on your site, including the and tags as well as the code for the header and footer of your site. So, for example, if you want to update your website's address in the footer or add Google Analytics tracking codes to your site, the category.tmpl is where you would make these updates.
There are dozens of story types in ARCOS, and each is associated with at least one template. For example, there is an article.tmpl template associated with article stories. These templates contain code specific to those types of stories. For example, the contribution_form.tmpl contains the HTML needed to display the input fields that collect a donor's name, address and credit card information.
There is also at least one template for every story element. For example, there is a paragraph.tmpl. You will almost never need to edit element templates—and if you do your Plus Three account manager can help you if you have any questions or hit any snags.
For a full list of templates, please click here.
How Are Templates Organized?
Templates are organized in the same category structure that is used for arranging stories and media. When a story is published, ARCOS looks for the appropriate templates in that story's category. If no matching template is found, ARCOS will search up the category tree until a matching template is found.
Vanilla Templates
Templates at / are special templates that should not be edited. They are the core "vanilla" templates. These templates are updated periodically by Plus Three to support new functionality as we grow ARCOS for you. If you find yourself wanting to edit a template at / , instead please copy the template to your site's root category and making the adjustments there. For example, if you want to edit /category.tmpl, please copy it to yoursite.org/category.tmpl and make the edits in this template instead.
Editing Templates
How Do I Know Which Template to Edit?
There are almost 200 templates in ARCOS, so at first glance the template system can seem daunting—but for the most part, there are very few templates that you will ever need to edit.
If you are not sure which template to edit, be sure to check above in the section Which Templates Are Used By Which Stories?.
Another convenient shortcut to find the template you need is to go to Find Templates in the left navigation and use the full-text search. For example, if you want to update your organization's address in the footer of your website, you could search for part of the address currently on the site (e.g., "Main Street"). The search results will include any template that has "Main Street" in it.
Editing Templates
The process for editing templates is similar to editing stories or media. First, locate the template you want and then click View Detail (to view the template) or Edit (checks the template out in your name and brings you an edit screen).
Note: There is an option in the Preferences section that lets you decide whether you would like the template editor screen to user synatx highlighting, which you may find makes it easier to read the templates.
Make the changes you would like, make sure the "Use this version in Preview?" checkbox is checked, and then click Save. Then follow the steps below to preview and deploy your changes.
Previewing Your Changes
On the Edit Template screen and on your Workspace, templates you are editing have a checkbox labeled "Use this version in Preview?" Make sure this is checked.
Then, preview a story that uses this template. Confirm that everything looks the way that you intended. If it does, follow the steps below to deploy your template.
Deploying Template Changes
After you have previewed your changes and when you are ready to make your template changes live, there are two steps:
- Deploy the template. This puts the template onto the file server but does not update any stories (page) on your site.
- Republish all stories that use this template. This step makes your changes live and visible to end users.
Using Templates to Customize Your Site
Any time that you are adding new logic to a template in order to make certain stories look or behave differently than other stories, you should first decide whether you want to add this logic to the existing template or create a copy of the template in a specific category. These are the two main ways to customize your site, and they have distinct advantages:
- Customizing the existing template. You can customize existing templates to behave differently for different stories based on a huge variety of factors, including the category the story is in, what type of story it is, and the elements in the story. For example, you could make contribution forms have a different footer than other stories. This is a good method in cases where you have relatively few changes to make to the template.
- Customizing a copy of a template (copied into a specific category of the site). You can customize any category of your site by placing a copy of the template(s) you want to modify into that category and making your edits. Any stories in that category will use that template. This is a good method in cases where you are making lots of changes to the template.
More About Templating
More About Specific Screens
- New Template
-
Create a new template
- Find Templates
-
Find, view, edit and delete templates
- Active Templates
-
View templates that are currently checked out by any user. Administrators can check in active templates.
- Retired Templates
-
View templates that have been retired