Why doesn't this work?
The method below displays a list of documents in the current folder, and is invoked from one of those documents. I want it to show the title of the current document as bold and not as a link, but it always displays as a link. I can display the values of 'thisdoc' and 'id' on each line, and I see what looks like a match, but the else branch is always used. I don't understand. Any hints? Thanks in advance. - Craig <!--#with "_.namespace(thisdoc=id)"--> <!--#with "PARENTS[0]"--> <!--#if "_.len(objectIds(['DTML Document'])) > 1"--> <!--#var folderimg--><A HREF="index_html"><b> In this folder...</b></A><br> <!--#in expr="objectValues(['DTML Document'])" sort=order--> <!--#if "thisdoc == id"--> <b><!--#var title--></b> <!--#else--> <!--#var bluedot--><a href="<!--#var id-->"><!--#var title--></a> <!--#/if--><br> <!--#/in--><br> <!--#/if--> <!--#/with--> <!--#/with-->
Thanks Pavlos, this did the trick. Just for the [public] record, I am including the working code below, with some description. Comments, corrections, enhancements welcome. - Craig ----------------------- The DTML Method below displays a list of documents (as links) in the current folder, and is invoked from one of those documents. It shows the title of the current document as bold and not as a link. Implementation notes: I have a very similar method called 'folderlist' in my topmost folder. I can invoke it from a document anywhere in the folder hierarchy. With the version below, you would need to have the images (folderimg and bluedot) in a folder somewhere in the hierarchy. <!--#with "_.namespace(thisdoc=id())"--> <!--#with "PARENTS[0]"--> <!--#if "_.len(objectIds(['DTML Document'])) > 1"--> <!--#var folderimg--><A HREF="index_html"><b> In this folder...</b></A><br> <!--#in expr="objectValues(['DTML Document'])" sort=order--> <!--#if "thisdoc == id()"--> <!--#var bluedot--> <b><!--#var title--></b> <!--#else--> <!--#var bluedot--> <a href="<!--#var id-->"><!--#var title--></a> <!--#/if--><br> <!--#/in--><br> <!--#/if--> <!--#/with--> <!--#/with-->
participants (2)
-
Craig Allen -
Pavlos Christoforou