Home > Domino Tips > Developer > Formula > Easy maintenance of Web site tabs
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

FORMULA

Easy maintenance of Web site tabs


Helana Neumann
05.12.2003
Rating: -3.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


View member feedback to this tip.

So you've got your web site ready to go, the tabs to all the site sections are all lined up and working perfectly, and then you get a call from the Web site designer or the graphics person, saying the design of the tab graphics has changed, the highlighted tab color has changed, etc. Back to the drawing board? No! Here's an easy way to set the tabs up which provides a quick and easy way to implement changes.



Code

I am assuming two sets of tabs, one set being the tab "highlight" color, which would be used when a person is viewing or editing a document in that tab's section of the site, and the other set being a "non-highlight" color.

First, on the form or forms in your database which will display the site tabs, create a field called PageType. Make it a drop-down field which contains all the page types in the site, i.e. each of the tab names plus any other page type names your site might contain but for which there is no tab, like Contact Us, Search, Site Map, etc.

Create a subform in your database called NavTabs. On this subform, create one Computed for Display Text field for each site tab. Call them something generic like "Tab1", "Tab2", "Tab3", etc.

In each of the Tab fields, put the following code:

Here's what's happening with this code:

You're first finding out the page type of the current document. In the example, we're finding out whether or not the current page has a page type of "Research." If so, when the Research tab is clic


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Formula
View hidden fields on Lotus Notes/Domino forms
Case-insensitive @Unique version combines fields on Lotus Notes forms
Provide rich-text formatting via the Profile document and Formula
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Formula language button manages Deny Access list searches
Retrieve Lotus Notes names from a nested group using @DBLookup
Create a computed Lotus Notes field to list Personal Address Book names
Show multiple Lotus Notes document fields in a single view column
How to send a document as a link in a Lotus Notes email

Lotus Notes Domino Formula Language
View hidden fields on Lotus Notes/Domino forms
Case-insensitive @Unique version combines fields on Lotus Notes forms
Do I use Formula or LotusScript to include a doclink to a Notes view?
Top 10 Lotus Notes/Domino coding and development tips of 2008
Provide rich-text formatting via the Profile document and Formula
Top 10 Formula language tips
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Stop response documents from showing in a Lotus Notes form
Formula language button manages Deny Access list searches

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


ked, it will open the document in the database called "research," which would be the home page of the Research section of the site.

Also, if this document has a page type of "Research," the Tab field will pull in the highlight-colored version of the tab graphic for that section. If the document has a page type other than "Research," the non-highlight-colored version of the tab graphic will be pulled in.

You'd then pull this subform into the top of all the forms in your database which need to display site tabs.

Once these formulas and fields are in place, if the tab graphics change in any way, all you'll have to do is name them res_hi.gif and res_dk.gif and replace the current res_ files in the image resources with the new files. No re-coding necessary!

MEMBER FEEDBACK TO THIS TIP

Here's how to highlight the current document in an Web menu. In Web applications we often use menus that may include the current document in the list. It could be a tabbed dialog, a horizontal menu or a left menu. With a little help of CSS and @Formula you can make the display of the current site automatic.

First create a stylesheet (CSS) like the following (in R6 you can attach it into a stylesheet resource; in R5 you create a page that is marked as "Treat as HTML"). Include the CSS in your form (in R6 by right clicking, in R5 by adding a formula in the HTMLHead field). Then create one computed for Display field surrounded by pass-through HTML. -- Stephan W.


Do you have comments of your own? Let us know.


Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts