WebReference.com - Part 2 of Chapter 7 from Essential Blogging. From O'Reilly (2/5).
[previous] [next] |
Essential Blogging, Chapter 7: Advanced Radio UserLand
Customizing Templates with Macros
Radio macros are always used between the <%
and %>
delimiters, which tell Radio to replace the name of the macro with its action when the blog is published. The standard Radio macros, those published and documented on the UserLand web site, are listed below. Your copy of Radio will have additional macros added to it automatically when Radio.root is updated.
The Prefs menu has a list of templates: Main template (the basic structure of almost every page in your blog); Main template (the basic structure of your public Radio UserLand home page); Day template (view of one day's entries); Item template (the format of a single item); and Desktop Website template, which contributes the home page when you are authoring your blog in Radio. Click on a template to edit it. Let's edit your Home page template to add a reminder of how to sign your checks. Once you've selected the template to edit, you'll see a page like Figure 7-7.
Figure 7-7: Editing the main template
The HTML template is in the textbox. Scroll down approximately halfway until you find the macro <%navigatorLinks%>
in HTML like this:
<%navigatorLinks%>
<hr size="1">
</td>
Change it to:
<%navigatorLinks%>
<hr size="1">
<br>Don't forget to date your checks <%year%>!
</td>
Click the Submit button and your Main template change will be saved. On the resulting page, you can see the effect of your change (see Figure 7-8).
Figure 7-8: Main template with change
When Radio constructs a page from the Main template, it now finds the macro <%year%>
, which is replaced with the current year.
[previous] [next] |
Created: October 14, 2002
Revised: October 14, 2002
URL: https://webreference.com/authoring/blogging/chap7/2/2.html