Hi,
Thank You Mark.
My personal opinion :
Attention, do not create a monster snippet which does the coffee, the housework and walks the dog.
I prefer several snippets, simple and rapid, that only one
Aour
-
☆ A M B ☆
- 24,524 Posts
But does it have an option for displaying a single random item?
Ok, wow alot happened in the few hours I was asleep!
@aour: The snippet does alot of things for two simple reasons. Every feature of the snippet is related to listing news and each of the functions does the same basic set of actions with minor differences. Therefore splitting this up into multiple snippets would involve repeating the same basic code with only minor changes making it a nightmare to maintain. Just think back a few months ago. I had to do everything I did in NewsListing to NewsFeed, NewsArchiver, etc. You get the idea...
@Theo: I couldn’t use getDocumentChildrenTV because it couldn’t handle multiple levels and Jason wasn’t happy with customSort. Ryan is correct in that NewsListing was around WAAAY before ChildDocumentMapper, so it would have been impossible to build off of it. BUT, I have pulled alot of code and code ideas from your version of ChildDocumentMapper for use in NewsListing.
EDIT: FYI ChildDocumentMapper was origionally 42 lines and after Theo added additional features it became 169 lines. Thats over 3 times its initial size. In that same manner NewsListing has grown by adding useful and related features to create a bigger better snippet!
@Ryan: "we can always clean it up into a nice little modular package later... let’s nail the functionality down first!" Thats coming soon as I’m slowly learning how to impliment advanced functions and classes from Jason.
The file snippet.newslisting.6.1.txt in the current download contains the characters "<?" on the first line. This should be removed.
Ooooops! Sorry, please remove that <?
Can’t wait! And thanks for the info!