Gossamer Forum
Home : Products : Gossamer Links : Discussions :

additional formatting on grouped links?

Quote Reply
additional formatting on grouped links?
I've been trying to come up with a way to allow post-processing of the links returned by the group by function for some time now. Back in 1.0 even.

What that would be, is either a hash of hashes or hash of arrays. Such that, the category name would be the key to the top array, and the value is a reference to either another hash of the links, or an array of the links.

This would lead to the data structure:

Category_Name1->(Link1, Link2, Link3,....)
Category_Name2->(Link1, Link2, Link3,....)


Ideally, this would be the raw "link" data ie: a hash reference, that could then be sent to the formatting routines. In the worst case situations, we are not returning more than 25 to 50 links at one time, and this would not affect page spanning, or anything else, since it's only the "block" of links that would have been put on the page anyway.

So, once the gb function was finished, the Category_Name1 reference was sent to the routine, and it pointed to a string of references that could then be processed via foreach or similar.

Barring that, the second best option would be for each "Link1", "Link2" etc to be the result of the SiteHTML::display output, and in effect be (what I've been calling) a Link nugget. Then, if Category_Name1 is passed to a routine, all that routine does is string the Link-nuggets together with the proper HTML.

This should _not_ be as hard as I'm making it <G>




PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Subject Author Views Date
Thread additional formatting on grouped links? pugdog 1780 Jan 4, 2001, 12:26 PM
Thread Re: additional formatting on grouped links?
Alex 1728 Jan 4, 2001, 2:42 PM
Post Re: additional formatting on grouped links?
pugdog 1716 Jan 4, 2001, 3:22 PM