Allen Gilliland wrote: > > > Elias Torres wrote: >> >> Allen Gilliland wrote: >>> >>> Elias Torres wrote: >>>> Allen Gilliland wrote: >>>>> On a slightly separate note, one other thing we need to think more >>>>> about >>>>> is the model methods. Just like macros we want to keep those as >>>>> trimmed >>>>> and clean as possible. >>>>> >>>>> In general the models like page and feed which are stateful and >>>>> represent a request should provide methods to get at the data from >>>>> that >>>>> request. So I think for these models the getTags() method should >>>>> return >>>>> the set of tags specified by the request, and null if no tags were >>>>> specified. >>>> I'm not sure I understand what does: "set of tags specified by the >>>> request". Could you please clarify a bit more? >>> meaning that when someone requests the url /weblog/tags/foo+bar or >>> /weblog/feed/entries/rss?tags=foo+bar then the output of >>> $model.getTags() should be the 2 EntryTagData objects for "foo" and >>> "bar". this follows the existing pattern where getLocale() or >>> getCategory() will return the value that is being used to render the >>> content (i.e. as specified by the request). >> >> getTags() returns just the tag name and the tag count. I don't want to >> use the tags specified in the request. getTags() is what we feed into >> the #showTagCloud macro to render. The difference between getHotTags() >> and getTags() is the sortBy method and the limit. In getHotTags() we >> only want 10,20,50. In getTags() we want them all (at least for a blog). >> Enter the limit parameter. If the site-wide tag cloud is too big we can >> restrict it to the top 100 and use a slider to get 300, 1000 via a url >> parameter or AJAX if needed (Note: your idea below of a lastUsed would >> be a much better tie-breaker when fetching top XXX instead of >> alphabetical sorting). > > well, I think it's very important that you provide a method in the > stateful models like pageModel & FeedModel that they have a method that > returns the tags which are part of the weblog request, and by convention > that method should be named getTags(). I don't care if you return the > TagAggData object instead of the EntryTagData object.
I see what you mean now. Just a method for accessing the request tags. > > I still don't understand what you intend to do with a tag cloud which > has hundreds or thousands of tags, that seems absurdly large to me. So > I am still not okay with having a way for users to get *all* of their > tags. Look at most sites like flickr.com/tags/ or technorati.com/tags/ > or del.icio.us/tag/, none of them offer tag clouds of more than 150ish > tags. I didn't say I wanted all tags for a site-wide. Maybe I have mistakenly said so somewhere else. "If the site-wide tag cloud is too big we can restrict it to the top 100 and use a slider to get 300, 1000 ..." We must remember the "long tail" (I can't believe I said that). I said a *weblog* would most likely need all of its tags for entry navigation and I doubt that would get to 10,000 or more. But sure, we can/should limit that (at least parameterize it with a default). > > -- Allen > > >
