s l a m
SITE LOGGING & MONITORING



Subscribe to "s l a m" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

© copyright 2002
by Marc Barrot.

Permalink
Thursday, March 28, 2002

Instant outline instant rendering

It looks as if Jon's been tackling some of the same issues I am trying to address through a different and very interesting method.

I've included a link to my instant outline in the navigation section on the left.

Now all I need is a callback to touch the outline story every time I save a modification to my instant outline.

Any Radio gurus around ?

1:04:02 PM  Permalink  comments:   Google It!  


New renderCss macro

Inspired by recent works from Carlos Grenier and Andy Fragen, as well as the new, 'released at last', and amazing (thanks Dave) Radio instant ouliner, I've created a macro to render opml outlines with css support directly in a weblog page.

In s l a m's home page, the headlines at the top, the links on the left, and the previous two posts are defined in opml outlines. Check headlines.opml, navsection.opml, resources.opml, and instant outliner.

These files were created using Radio's outline features. s l a m's #homeTemplate includes three instances of the renderCss macro:

For headlines, <% renderCss ( "Data:Marc:Radio UserLand:www:gems:opml:headlines.opml", "headline", 2, 1 ) %>.
For navsection, <% renderCss ( "Data:Marc:Radio UserLand:www:gems:opml:navsection.opml", "navsection", 2, 0 ) %>.
For resources, <% renderCss ( "Data:Marc:Radio UserLand:www:gems:opml:resources.opml", "navsection", 2, 0 ) %>.

The homeTemplate's header also includes a tag that loads a related css stylesheet:
<link rel="stylesheet" type="text/css" href="gems/css/homeTemplate.css">.

renderCss' mandatory first argument is the full path name to the opml file to render. On a Windows system, use '\\' instead of ':' as a folder separator.

The second optional argument is the name of a css class. If none is supplied, renderCss uses 'l' by default. Every headline level in the outline is numbered by renderCss from 1 to N, N being the depth of the outline (for instance, N = 2 for the headlines and navsection outlines on this page).

Every headline in the outline is rendered inside a paragraph, with a class attribute formed by concatenating the second argument with the current level (by default, <p class='l1'> for first level headlines, <p class='l2'> for the second level and so on).

The third optional argument is the maximum depth rendered in the outline. It defaults to 0, no limit. If an outline has a depth of 4 levels, but renderCss' third argument is 2, all subs of level 3 and 4 are ignored when rendering.

The fourth optional argument is the maximum length rendered in an outline. It defaults to 0, no limit as well. If an outline includes 4 headlines of level 1, but renderCss' fourth argument is 2, only the first 2 root headlines and their subs are rendered, the remaining 2 are ignored. The way headlines.opml is rendered on this page is a good example for an argument value of 1.

If you don't have a headache by the time you finish reading this post, you should be worrying.

The source code for renderCss is available here. Save it as a renderCss.txt text file in Radio's Macros folder, then start including opml oulines everywhere.

1:57:50 AM  Permalink  comments:   Google It!  


InstantOutliner rendering

Look Ma, no hands :-) The following line is :

<% renderCss ( "Data:Marc:Radio UserLand:www:instantOutliner:marcBarrot.opml", "instant" ) %>

It is rendered as: [Macro error: Can't call the script because the name "renderCss" hasn't been defined.]

Hey, how cool is this ?

1:16:49 AM  Permalink  comments:   Google It!  


March 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Feb   Apr

last updated: 10/20/02; 9:58:30 PM.