





















































There are several standard model and data objects you can use in Apache Roller to access your weblog's data. Some of the most widely used are $config, $model, $url, $utils, $weblog, $weblogCategory, and $weblogPage. In the following exercise, you'll get to work with the $config object.
This model is used to access Roller's site-wide configuration parameters, such as the e-mail address of Roller's administrator, the name of the Roller site, and so on.
The following exercise will show you how to use some properties of the $config model object inside your custom template:
Welcome to my blog, <b>$model.weblog.name</b> --> <i>$config.
siteDescription</i> </br>
I'm using Apache Roller Version <b>$config.rollerVersion</b> </br>
You can e-mail me at <b>$config.siteEmail</b> if you run into any
problems in this site. </br>
This is my first template </br>
My weblog's absolute URL is: <b>$url.absoluteSite</b> </br>
</br>
The following table summarizes the $config object properties you learned to use in the previous exercise, along with their value:
Property |
Definition |
Value |
$config.siteDescription |
Shows your site's description. |
My First Installation of Apache Roller |
$config.rollerVersion |
Shows the Apache Roller version used. |
4.0.1 |
$config.siteEmail |
Shows the site administrator's email. |
You can find all $config parameters under Roller's Server Admin tab:
These objects are used to access all the data for a specific weblog: weblog entries, categories, comments, among others.