spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / authoring / blogging / chap7 / 2 To page 1To page 2To page 3To page 4current page
[previous]

Essential Blogging, Chapter 7: Advanced Radio UserLand

Sr. Programmer/Analyst
Professional Technical Resources
US-OR-Portland

Justtechjobs.com Post A Job | Post A Resume
Developer News
Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next

Listing Recent Posts

People who read your blog will vary from everyday readers to occasional browsers. If you blog frequently, you may find that those occasional readers are penalized by the sequential, newest to earliest, nature of blogs. To make this easier for readers, you can add the Recent Posts macro to your blog. The Recent Posts macro lists the titles of recently added posts. You must have titles enabled (see Chapter 4) to use the Recent Posts macro. Figure 7-9 shows the Recent Posts macro in action.

Recent Posts macro
Figure 7-9: Recent Posts macro

Like many Radio macros, the Recent Posts macro (actually called radio.macros.recentTitledBlogPosts) can be called with parameters. In the case of this macro, the parameters specify how many posts to display, whether to truncate titles, and so on. The five parameters, all of which are optional, are listed with their default values in Table 7-1.

Table 7-1: Parameters to the Recent Posts macro

ParameterDefault ValueMeaning
maxPosts25Maximum number of posts to display
maxTitleLength(infinite)Maximum length of title (titles will be truncated to this length)
flIncludeWhentrueList the dates of the posts as well as their titles
Catname""Category of posts (empty string means all)
cellSpacing0Cell spacing for the table

So to display a Recent Posts list, but truncate the titles at 50 characters, you'd use:

<%radio.macros.recentTitledBlogPosts (maxTitleLength:50)%>

To raise the number of posts to 50:

<%radio.macros.recentTitledBlogPosts (maxPosts:50)%>

To add 5 pixels between each line in the post lists and between the title and the data (i.e., set the cellspacing attribute of the HTML table that displays the posts):

<%radio.macros.recentTitledBlogPosts (cellSpacing:5)%>

To give 10 posts a title length of 50 characters, with no dates and 5 pixels of cell spacing:

<%radio.macros.recentTitledBlogPosts (maxPosts:50, maxTitleLength:50,
flIncludeWhen:false, cellSpacing:5)%>

To add this macro to your template underneath your calendar:

  1. Update your Radio.root file as described earlier in Chapter 3.

  2. Click on the Prefs link in the Radio command bar.

  3. In the Templates group of links, click on the Home Page template.

  4. Find the call to <%drawcalendar ( )%>.

  5. Add the Recent Posts macro after the call to drawcalendar. Exactly where to put it in the HTML depends on the template you're using. For example, in the Default template, the calendar is part of a table with your navigation links and various Radio and XML icons. In this case, it's best to put the Recent Posts list outside that table. In the Woodlands theme, the icons and links are elsewhere, so you can simply put the Recent Posts macro call immediately after the drawcalendar call.

    <%radio.macros.recentTitledBlogPosts (maxTitleLength:50)%>
    
  6. Click on Submit to save your template.

Reload your blog's home page and you should see the Recent Post list. Figure 7-10 shows the Recent Posts list added to the Default theme.

Calendar and recent posts
Figure 7-10: Calendar and recent posts

If you find that the macro's output doesn't appear on your blog, one of two things is probably wrong. An error message from Radio probably indicates a syntax error-check that you haven't mistyped the % characters or mistyped the macro or its arguments. If you just don't see a change, your changed post probably hasn't been upstreamed yet-wait a few seconds and try again. If it still doesn't work, check your network connectivity and look at the Events log in Radio.

Additional Macros

There are many different macros for Radio templates: some from UserLand, some from individual developers, and some from third parties. Different types of macros include the very popular GoogleBox, picture galleries, image uploaders, and more. Locate these macros via these directories:

http://radio.userland.com/directory/6742
http://ruminations.weblogger.com/directory/143

Creating and Downloading Themes

Although adding macros to an existing Radio template is relatively easy if you are comfortable with HTML, it is actually quite difficult to create an entire theme. A third-party product for Radio, themeTool, lets you create your own themes using standard web development tools such as DreamWeaver or FrontPage. More information is available from:

http://radiotools.evectors.it
http://radio.userland.com/stories/storyReader$7024

home / authoring / blogging / chap7 / 2 To page 1To page 2To page 3To page 4current page
[previous]



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview · Controllers: Programming Application Logic - Part 2 · How to Use JavaScript to Validate Form Data
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Choosing the Right Online Backup Provider · Mother Avaya Nurtures Her Technology Partners · Software as a Service a Winning Model for Hotspot Provider

Created: October 14, 2002
Revised: October 14, 2002

URL: http://webreference.com/authoring/blogging/chap7/2/5.html