I am adding nodes to a parent node dynamically - theere could potentially be hundreds. What I woudl like to do is show only the last 10 nodes added, but include a last node that reads "More..." which will link off to a full listing.
If anyone has any ideas I woudl appreciate it - while I have a solution I am using it seems rather lengthy and hackish.
You'll need to add your select statement, and what to do with the results, but this should show the top 10 nodes, or all if the querystring ?show=all is present.
Thanks Matt - does this apply to the Umraco Admin area? I am talking about nodes in the content section - so not sure how (where) I could use the above XSLT?
I'm not sure what you are wanting to do then is possible (or at least not easy).
My best suggestion would be either to use something like the AutoFolders package which can automatically sort your nodes into sub folders, making it much easier to manage. Or, I'd look into the jQuery used by the trees and see if you can extend that to only show X many nodes. I'm not sure of the link, but I know @slace posted somewhere about achiving a fake sort by only modifying the trees javascript, so there should be a way to hook into it.
Thanks Matt - auto folders sounds promising, and I expect (hope!) I can use some JQuery to sort the "More..." requirment (maybe display the last 11, but hi-jack the11th node with the "More..." link / text. Though maybe auto folders will negate the need for this.
Yeah AutoFolders is what I'd go with, even with the current tree it's not really possible to do the kind of lazy-loading you sound like you're after.
The thing I think Matt is referring to is I worked out a way to show the nodes in a fake order, but it would still show all of them. I used it in a talk I gave at DDD Melbourne: http://www.aaron-powell.com/dddmelbourne-umbraco
Display only last 10 nodes
I am adding nodes to a parent node dynamically - theere could potentially be hundreds. What I woudl like to do is show only the last 10 nodes added, but include a last node that reads "More..." which will link off to a full listing.
If anyone has any ideas I woudl appreciate it - while I have a solution I am using it seems rather lengthy and hackish.
Something like this could work:
You'll need to add your select statement, and what to do with the results, but this should show the top 10 nodes, or all if the querystring ?show=all is present.
Matt
Thanks Matt - does this apply to the Umraco Admin area? I am talking about nodes in the content section - so not sure how (where) I could use the above XSLT?
Ahhhh, my appologies, I miss read your question.
I'm not sure what you are wanting to do then is possible (or at least not easy).
My best suggestion would be either to use something like the AutoFolders package which can automatically sort your nodes into sub folders, making it much easier to manage. Or, I'd look into the jQuery used by the trees and see if you can extend that to only show X many nodes. I'm not sure of the link, but I know @slace posted somewhere about achiving a fake sort by only modifying the trees javascript, so there should be a way to hook into it.
Matt
Thanks Matt - auto folders sounds promising, and I expect (hope!) I can use some JQuery to sort the "More..." requirment (maybe display the last 11, but hi-jack the11th node with the "More..." link / text. Though maybe auto folders will negate the need for this.
Yeah AutoFolders is what I'd go with, even with the current tree it's not really possible to do the kind of lazy-loading you sound like you're after.
The thing I think Matt is referring to is I worked out a way to show the nodes in a fake order, but it would still show all of them. I used it in a talk I gave at DDD Melbourne: http://www.aaron-powell.com/dddmelbourne-umbraco
is working on a reply...