Parameters
Parameters are very handy if you want to allow story editors to be able to control the presentation of content on a story-by-story basis, especially if there is no clear logic as to which stories should look one way and which should look another way.
For example, imagine that your story editors want the page title to not appear on some stories. If all of the stories that should not have a title are in one category, you could easily add template logic to not display the title if the story is in that category. Or, if all of the stories that should not have a title are contribution forms, you could easily add template logic to not show the title if the story is a contribution form. But, if the stories are throughout the site and which ones should and should not have a title is somewhat random, it can be very helpful to use a parameter to let your story editors decide on a story-by-story basis whether to show the title or not—without them ever having to edit a template themselves.
How to Create a New Parameter
1. Decide on a name. You can name a parameter just about anything you like. Use a name that is short and clear. For example, if you are adding a parameter to decide whether to hide the title, you could call it "no_title".
2. Use the parameter in your template. The parameter can be referenced using this syntax:
<tmpl_var param_the_parameter_name>
For example, your "no_title" parameter would be:
<tmpl_var param_no_title>
Parameters can be used in template expressions just like other variables. For example, this statement adds the logic to show the story title unless a parameter element named "no_title" is present in the story and evaluates to true.
<tmpl_unless param_no_title>
<tmpl_var title>
</tmpl_unless>
3. Add the parameter to the appropriate stories. At this point, your story editors can add a parameter element to a story in order to hide the title. The name of the parameter would be "no_title" and the value would be "1" (true).
Now, when the story is published, the template will evaluate the expression above, find that no_title is true, and would not display the title.
Another Example
Imagine you want the phone number in your website's footer to be different on certain pages than it is on most pages. You could use a parameter to accomplish this. You would first adjust the template to include this logic:
<tmpl_if param_footer_phone_number>
<tmpl_var param_footer_phone_number>
<tmpl_else>
The default number
</tmpl_if>
Then, your story editors could add a parameter element to any story where they wanted the phone number in the footer to be different. They would set the parameter name to "footer_phone_number" and the value to the phone number (e.g., "(555) 555-5555").