Display siblings linking

Use this automatic code to display all sibling links on a document
Lotus Formula • Lotus Notes Form


unidlist := @DbLookup("":"NoCache";"";"itipsiblingLU";collection;3);
titlelist := @DbLookup("":"NoCache";"";"itipsiblingLU";collection;4);

activeimg := "&nbsp;<img border=\"0\" src=\"" + "/" + @WebDbName + "/threadmap_active.gif" + "\">&nbsp;";
inactiveimg := "&nbsp;<img border=\"0\" src=\"" + "/" + @WebDbName + "/threadmap_inactive.gif" + "\">&nbsp;";

@If(@IsError(unidlist);"";
	@Do(
		@For(n:=1; n<=@Elements(unidlist); n:=n+1;
			@If(
			@Text(unidlist[n])=@Text(@DocumentUniqueID);
			linklist := linklist + activeimg + Title + "<br>";
			linklist := linklist + inactiveimg + "<a class=\"htool\" href=\""+      "/" + @WebDbName + "/" + @Subset(@ViewTitle;-1) + "/" + @Text(unidlist[n]) + "?opendocument" + "\">" + @Text(titlelist[n]) + "</a><br>"
			)
		);

		@If(
			@Elements(unidlist)=1 ; "" ;
			"[" + <br><label>Related Topics:</label><br>" + linklist + "]"
		)
	)
)

Images/Screenshots:

Written by Frank Joseph Brefere III

Posted by fbrefere001 on Tuesday February 26, 2008