Antville Project

another proposal: list macro

getting further along with rewriting and rearranging the helma documentation at hopdev, i treated myself with another gift: the list macro.

if you take a look at the introduction to the section "image processing" you'll see a list of image functions at the bottom of the text.

this list was created by the macro call <% list filter="topic" name="Image Processing" itemprefix="<li>" itemsuffix="</li>" %>

it simply loops over the stories contained in the topic named "Image Processing" and displays their titles as links to themselves.

future applications of this macro could be lists of weblogs and users, too (that's why there is that filter parameter already).

there is just one question left: with the new extended content scheme i don't have a clue how i could sort this list by titles except if i put them into an array and do it in javascript...?

btw. i checked in these modifications as well as those made for the shortcut macro into a new branch called helmaville.

comment    

 
robert, July 17, 2002 at 12:51:44 PM CEST

looks nice! reg. sorting: i think doing the sorting in javascript is the only way, but would have the benefit that the macro could be even more flexible (eg. sortby="[name|createtime|modifytime]" order="[asc|desc]").

link  

 
tobi, July 17, 2002 at 2:18:00 PM CEST

that's true

and a good suggestion, robert. but don't i have to fear that the display is getting too slow, then?

link  

 
robert, July 17, 2002 at 2:26:31 PM CEST

don't think so (the history-list was done like that months ago), but you'll never know until you tried it out ;-) btw.: what do you think about an additional attribute limit="[int]"? and i wonder if we could even bloat that macro up so that it could also render a skin for each story (just imagine you want to have the last n stories of the topic "news" on the frontpage of your weblog, but those stories should be presented with title and abstract). and if users are able to create custom skins (eg. create a special story-skin for the display on the weblog-frontpage) ... [ok, now i stop ;-)]

link  

 
tobi, July 17, 2002 at 2:36:57 PM CEST

nono

please don't stop: that's exactly what i wanted to read! :)

+1 for the limit parameter.

link  

 
hns, July 17, 2002 at 2:50:17 PM CEST

limit

yes, we need a "limit" attribute, but I propose we call it "max". Sounds a bit clearer about its purpose to me.

link  

 
tobi, July 17, 2002 at 5:32:13 PM CEST

-1

the overall use of limitating the amount of items to display in macros (e.g. in sitelist) is determined by a limit parameter. so i rather will stick to this naming until we rename all these parameters.

moreover, i wonder if we even should implement "from" and "to" parameters for picking out a certain set of items to display... (some kind of browsing?)

link  

 
hns, July 17, 2002 at 5:33:44 PM CEST

'kay

link  


... comment
 
hns, July 17, 2002 at 2:45:57 PM CEST

list macro(s)

We certainly need a macro to generate various lists. I'm not very convinced of having one generic "list" macro that is able to list anything, since that merely puts the complexity into the attributes. So I propose to call that macro "liststories" or "storylist" instead, and then add other macros for listing sites, users etc as we implement them. Otherwise, you'd need to specify somewhere that you want stories to be listed (using for example an attribute like 'what="stories"'), unless you'd take that implicitly from the Filter="topic".

Also, I find the

filter="topic" name="Image Processing"

attributes too verbose. By the attribute names alone, it's also not very clear that the name attribute belongs to the filter attribute, unless they are in the exact sequence as in your example. I think we could replace these two with

topic="Image Processing"

What happens if no filter is specified? I'd say this would produce a list of 10 or 20 recent stories on the weblog frontpage. Any other ideas?

link  

 
tobi, July 17, 2002 at 2:52:57 PM CEST

i already got away from the filter param (was a quickshot), but in fact it was thought to define what should be listed.

different macros for the different types (probably "type" is what i should have used instead of "filter") is fine with me, makes sense if we have all the additional params like sort, order and limit, too.

link  


... comment


The Antville Server Fund has been a great success. Thanks to everybody who contributed!
online for 8577 Days
last updated: 1/4/11, 10:22 AM
status
Youre not logged in ... Login
menu
December 2024
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
293031
July
recent
zfuture's house here is zfuture's
house
by zfuture (7/31/03, 2:59 AM)
i understand your concerns however,
i hardly can think of a solution. certainly, if the...
by tobi (7/29/03, 9:47 AM)
Found several more similar sites
listed This is getting to be quite a concern to...
by cobalt123 (7/27/03, 7:56 PM)
Second Post Alert on Referrer
bug livecatz I put this into "help" and now here:...
by cobalt123 (7/26/03, 7:14 PM)
well it's not easy to
find from here, anyway. think we should include a link,...
by tobi (7/24/03, 11:25 AM)
So finally I found
the helma Bugzilla - stupid me.
by mdornseif (7/24/03, 10:28 AM)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
but blogosphere.us isn't can't really
be rated as spam can it?
by kohlehydrat (7/23/03, 8:08 PM)
More referrer spam www.webfrost.com
by Irene (7/23/03, 7:55 PM)
How to log skin names
I accessed to console?? Hi, I would like to know...
by winson (7/23/03, 4:12 PM)

Click here to get an XML version of this weblog.

Made with Antville
powered by
Helma Object Publisher