Time for action — properties and methods of the $url and $utils objects
The following exercise will show you how to use some properties and methods of the $url, $utils, $category
, and $entry
objects inside your custom template:
Go to your custom template editing page, and replace the
<tr><td><i>$category.name</i></td>
line with the following line:<tr><td><i><a href="$url.category($category.path)">$category. name</a></i></td>
The following screenshot shows how your code will look like after the change:
Save your changes and click on your template's [launch] link to open a new tab in your web browser and see the results:
If you click on any of the categories, Roller will show you all the posts within the category you chose. For example, if you click on the General category, you'll get the following results:
Now go back to your custom template's editing page and replace
<a href="$entry.permalink">$entry.title<...