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. | alromeromx@gmail.com |
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.
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…