|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to create Yahoo-like Web folder navigation (continued)
The element (FolderNavigation) has but a single column. This displays the names of the folders (the field "Name") and is sorted in ascending alphabetical order. As we shall see, this view will be used in an @DbLookup to obtain the folder names for the Web.
Presenting the navigation on the Web Once information about the folders and views is established, and the desired folders are selected, all navigation is performed by a single form called Folder. Every navigation page that's shown on the Web is just a redisplay of the Folder form. Because Folder has a SaveOptions field with a value of 0, no document is ever created from it. A form was used as a design element, instead of a page, because of the need to have computed fields.
Conceptually, the folder and view hierarchy branches out from a single common location, which is referred to as "root" in this design. Thus, a folder named "Automobiles\Ford Motor Co" is referred to as "root\Automobiles\Ford Motor Co\". The final "\" is added to aid in parsing out the folder hierarchy.
As the user moves from one folder to another, the folder's contents are displayed in a computed, embedded view on the Folder form. This leads to a problem with the root; there is no actual folder or view associated with it. To circumvent the problem, a stand-in view, called (dummy) has been added to the design. This view collects no documents--its selection formula is SELECT Form="NoSuchForm". Whenever a user selects the root, the embedded view references (dummy).
Begin the navigation at the root with the following URL:
Here "site-name/database-name" is the Internet address for the database (i.e., www.mycompany.com/companyinfo.nsf).
The complete URL syntax for displaying the Folder form is:
Here "folder-name" is the cascaded, hierarchical name of the desired folder or view, (i.e., "root\Automobiles\Ford+Motor+Co"). The plus symbol is substituted for blanks. The top of the hierarchy, the root, can be referred to as "…CurrentLocation=root", "…CurrentLocation=root\", or "…CurrentLocation="
The layout for the Folder form is shown in Figure B.
FIGURE B
 
The underlying form layout is simple and clean. Roll over picture for a larger image.
You can easily change the look to suit your own needs. On the Folder form, six hidden fields, two visible fields, and one item of computed text do most of the work.
The hidden field SaveOptions is set to a value of "0", ensuring that the Folder document is never actually saved.
The field Folders is a hidden, computed-when-composed, multi-value field that uses @DbLookup to obtain a list of folder names from the (FolderNavigation) view. The formula prepends each name with "root\" and appends each with "\". To this list, it adds one additional element, "root\" to represent the root of the folder hierarchy. The formula for this field is:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- 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. |
|
|
|
|
|
|
|
|
|
|