|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to create Yahoo-like Web folder navigation (continued)
"root\\" : ("root\\" + @DbColumn(""; ""; "(FolderNavigation)"; 1) + "\\")
|
The hidden field "Query_String_Decoded" is the standard CGI (Common Gateway Interface) variable field that captures everything after the question mark in the URL and presents it with special characters decoded.
The field "CurrentLocation", hidden and computed-when-composed, is a single-value field. This field extracts the desired folder name from "Query_String_Decoded" and conditions it to prevent errors. The conditioning includes:
- Ensuring that a blank location is replaced by "root\";
- That any non-blank location begins with "root\", and
- That any double slashes ("\\") are replaced by single slashes ("\").
The formula for this field is:
apos := @Length(@Right(@LowerCase(Query_String_Decoded); "location="));
TestLocation := @If(apos = 0; "root\\"; @Right(Query_String_Decoded; apos) + "\\");
REM "make sure the location starts with root\\";
TestRoot := @UpperCase(@Left(TestLocation; 5));
TempLocation := @If(@Left(TestRoot; 5) != "ROOT\\"; "root\\" + TestLocation; TestLocation);
REM "replace double slashes with single slashes";
@ReplaceSubstring(TempLocation; "\\\\"; "\\");
|
The field FolderName is also hidden and computed-when-composed. This field extracts the precise name of the desired folder. In addition, the name is checked against the values in the field Folders to ensure that the folder actually exists. If the folder name does not exist, the name (dummy) is substituted.
There are several reasons that the named folder might not exist. First, the URL could have been entered incorrectly by hand. Second, the URL could come from an obsolete bookmark and reference a subsequently deleted folder. Third, the reference could be to the root, which doesn't really exist as a physical folder. Finally, it's possible to create a folder hierarchy in which there are no intermediate folders. For example, there could be a folder called Automobiles\Ford Motor Co and another called Automobiles\Ford Motor Co\Recalls\Tires even though Automobiles\Ford Motor Co\Recalls doesn't exist. Any reference to Automobiles\Ford Motor Co\Recalls would have to be handled gracefully.
The formula for FolderName is:
REM "extract the folder name from CurrentLocation";
fn := @LeftBack(@Right(CurrentLocation; "root\\"); "\\");
REM "determine if the name is an actual folder";
testname := "root\\" + @If(fn = ""; ""; fn + "\\");
IsNotAFolder := @IsNotMember(@LowerCase(testname); @LowerCase(Folders));
@If(IsNotAFolder | testname = "root\\"; "(dummy)"; fn)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by April 10 to save $200. |
|
|
|
|
|
|
|
|
|
|