How to expand all items in main content tree when loading page
Well, I have tried many different variants of my own solutions but all of them failed/did not fetch all nodes correctly. was wondering if anyone was trying to expand all the items when the page is loaded?
What version of Umbraco are you using? And is it safe to assume you have tried doing something in the backoffice rather then on the frontend part of the website?
I'm sorry i didn't mention, I'm using version 6.1.6.
What iv'e mostly tried was related to the file umbraco_client\Tree\UmbracoTree.js. I tried to add my own code into there, which mostly fetch only the first level, and also changing the tree's object settings. both ways didn't work for me.
Ok - Not sure I know how to point you in the right direction but perhaps others coming across this post could benefit from seeing some of the code you have tried adding/modifying in the mentioned file if you don't mind sharing it.
How to expand all items in main content tree when loading page
Well, I have tried many different variants of my own solutions but all of them failed/did not fetch all nodes correctly. was wondering if anyone was trying to expand all the items when the page is loaded?
Hi Mico
What version of Umbraco are you using? And is it safe to assume you have tried doing something in the backoffice rather then on the frontend part of the website?
/Jan
I'm sorry i didn't mention, I'm using version 6.1.6.
What iv'e mostly tried was related to the file umbraco_client\Tree\UmbracoTree.js.
I tried to add my own code into there, which mostly fetch only the first level, and also changing the tree's object settings.
both ways didn't work for me.
Hi Mico
Ok - Not sure I know how to point you in the right direction but perhaps others coming across this post could benefit from seeing some of the code you have tried adding/modifying in the mentioned file if you don't mind sharing it.
Cheers, Jan
Sure, here's my code:
var c = $('.closed.loaded').click();
clickedItems = c.length;
}
$(function() {
//First attempt
while (clickedItems != 0) {
expandNodesInCurrentLevel();
}
//Second attempt
for (var i = 0; i < 10; i++) {
expandNodesInCurrentLevel();
}
});
is working on a reply...