Here is how the startUltimateParent & topDoc are supposed to work. If you call it like your example, when you are on a page inside of folder 56 you will see a menu that shows all items under doc folder 56. If you are not in folder 56 it will start from the site root 0. It acts this way because the currentdocId and the topdoc is passed to the ultimateparent function (same as the snippet). So if you are inside folder 56 ultimateparent will go up the tree until it hits 56 to find where to start the menu from. If you are not inside folder 56 it will go up the tree all the way to 0 because it will never find doc 56.
I hope that makes sense, let me know if it is not functioning this way for you.
Thats strange, can you post your whole snippet call and a screenshot of what your doc tree looks like. I can’t duplicate the level=`0` not working on my tests and would like to fix any problem with it.
[!WayFinder? &level=`0` &startId=`581` &outerTpl=`menu_outerTpl` &parentRowTpl=`menu_parentRowTpl` &hereTpl=`menu_hereTpl` &innerTpl=`menu_innerTpl` &innerRowTpl=`menu_innerRowTpl` &innerHereTpl=`menu_innerHereTpl` &firstClass=`first` &lastClass=`last` &hereClass=`here` &parentClass=`parent` &rowClass=`row` &levelClass=`level` &outerClass=`outer` &innerClass=`inner`!]
Thanks for finding that error
EDIT: about the code posted above, I was thinking that we could achieve the same result by adding to each item a css id made with its id prefixed with doc. The only reason I prefered using TV is for css reading and coding.
Kyle, regarding the UltimateParent functionality, why don’t we pull it out and let the UltimateParent snippet do it’s own thing here. No reason not to nest them and would keep the snippet from drifting off into bloatland.
Quote from: heliotrope at Aug 03, 2006, 10:20 AM
EDIT: about the code posted above, I was thinking that we could achieve the same result by adding to each item a css id made with its id prefixed with doc. The only reason I prefered using TV is for css reading and coding.
heliotrope, I think I am leaning toward adding this ability but not using a tv. Doing it with a tv makes it hit the database each time it needs to get the tv value which could greatly increase processing time on large menus. So here is what I was thinking (similar to what you have above):
add a parameter like &rowIdPrefix
add a new placeholder [+wf.id+] for the following templates: rowTpl,parentRowTpl,hereTpl,innerRowTpl,innerHereTpl
If the parameter is specified in the snippet call add the docid to the value from &rowIdPrefix and then insert it into the template.
It will make for some strange ids but will not require another db per item and will give you the functionality you are looking for.
What do you think?
This discussion is closed to further replies. Keep calm and carry on.