At 01:36 25-2-99 , Michael Bernstein wrote:
Martijn Pieters wrote:
Step 2: Create a DTML method named SideBar in your root folder with the following code:
<!--#tree branches=getFoldersOnly--> <A HREF="<!--#var BASE1-->/<!--#var tree-item-url-->"><!--#var id--></A> <!--#/tree-->
You can skip the External Method if you use the branches_expr tag, instead of the branches tag, like so: <!--#tree branches_expr="objectValues(['Folder'])"--> <A HREF="<!--#var BASE1-->/<!--#var tree-item-url-->"><!--#var id--></A> <!--#/tree-->
Is there a performance difference between these two approaches? If not, I think I would prefer to factor out the method, as it might come in handy somewhere else.
Michael Bernstein
I think the latter version, branches_expr, would be faster, but only by a merest sliver of a fraction. The external method is after all another stack level. Using the branches expression skips a step. Compare EM: branches -> external method -> tree-list-expression Direct: branches_expr -> tree-list-expression