Link to home
Start Free TrialLog in
Avatar of R-U-Bn
R-U-Bn

asked on

Domino Designer (website): A (javascript) menu that should be displayed on all pages

Hi,

I am quite a Lotus dummy (rather a html, php, mysql freak), but my company uses Lotus Domino for old pages, stillI think this should be rather an easy question for those Domino lovers (if there are any).

I have a menu that, in a normal html page is invoked by putting the following lines in the head:
*******************************************************************
<script language="Javascript" src="http://www.eiba.com/menudata2.js"></script>
<script language="Javascript" src="http://www.eiba.com/menuscript2.js"></script>
<link rel="stylesheet" href="http://www.eiba.com/PV_menustyle.css">  
<script>initMenu(140,5)</script>
<BR><BR>
************************************************************

Now, I tried this on 1 page (inside "Pages" of a certain database) in Domino Designer by inserting a formula in the "HTML Head content" Object of that page. The formula is nothing else but the html-text above but then between quotation marks ("<script lan...").  (All the .js & .css files are in the Lotus html directory, in case you might wonder).
And what do you know: IT WORKS!
Have a look here, if you wanna see how the page and the menu look like:
http://www.eiba.com/homeTEST.nsf/Home?OpenPage.

Now, I want domino to insert these lines in the header of EVERY page, so I will have a menu on every page without having to edit every page('s objects).
How do I do that ?

If that wouldn't work and only then: How can I make domino display a similar menu on every page by other means ?

Thanks guys,
another web developer ( http://www.e-builds.com )
Avatar of CRAK
CRAK
Flag of Netherlands image

Domino lovers?
Well... ok, I'll volunteer!  ;-)

To avoid miscommunication: notes has design elements like "views", "pages" and "forms". In normal database terms, views can be compared with tables and can be displayed as webpage. Both "forms" and "pages" can be used to present web pages but there is an important difference.
Where pages are quite static, forms can be seen as record, a template for documents (rows in a table). Users can fill out forms (create documents = generate rows in a table). Domino will translate those (on the fly) to html web pages, based on the design of the original form. On that form (but on pages as well) you could add your own HTML, JS, CSS references etc. justas you have discovered.

I assume your "pages" are documents. If you look at the document properties (Alt + Enter opens the property box), 2nd tab, you can view the value of the field "Form". It's the name of the form that was used to create the document with. Unless a view formula defines otherwise, the same for is used to show those documents. It's that form that you have to change and all documents of that definition will adopt the new change!

Views are normally shown as either embedded elements on forms or pages, or through special forms, called $$ViewTemplate (-Default or -for <viewname>). Handle those just as the other forms/pages.

Hope this helps...

In short:
If a database contains 100 documents of form "x", all you have to do is modify form x, not the 100 doc's.
Avatar of R-U-Bn
R-U-Bn

ASKER

Hi,
Thanks, first of all.  :-)

I can't find the "Form" in document properties.  What I can find is the following:
In the list of pages, when a certain page is selected, "ALT + ENTER" or "Document Properties" from File menu or  "Design Properties":

+ Second tab (a triangle with tooltip "Fields"), a lot of fields with a $ prefix but no "Form" there.

+ Third tab, there is a "Inherit from design template", (a triangle with hammer with tooltip "Design"), but I don't know if and how that would work for my problem.  Does that need to be a form (there is no drop down, nor Browse) ?  
Or is this precisely what you mean, but with another name and position in the properties ?
->But the same "Inherit from design template" also exist in my database properties.  Which one should I use (if this is what I should use at all)?

P.S. Domino Designer 5.0.10;
I know we are not up to date, but we don't want to upgrade since we are 'afraid' of Lotus a bit. (That's why we are going to change in the future anyway.  Like I said, this is a temporary solution for some 'old ' pages)
You've been checking the properties in the designer client. Check the documents in the (normal) notes client. Same tab!

Not up to date? I answered a 4.6 question just the other day! ;-))
I only upgraded to 6 at home last month. Not even 6.5! At work I'm running 5.0.10 as well.
Avatar of R-U-Bn

ASKER

OK, now I see the problem:

Our site doesn't have documents, they are all pages.
My colleague just tells me that that was not the way to make those 'old' pages, but still.

Sorry, because you mentioned it in "'I assume your "pages" are documents' , but I guess I thought that was the case and now I know it is not.

(I found the tab now, of course, with some test document I made).

Any way to make this work after all ?
Any other solutions ?
ASKER CERTIFIED SOLUTION
Avatar of CRAK
CRAK
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of R-U-Bn

ASKER

Any other suggestions from anyone ?
Perhaps in the Lotus Notes topic area (under applications)....
How many pages are we talking about?
Avatar of R-U-Bn

ASKER

CAn't count them, but I guess 200+
And it's just a matter of pasting the same line of code in, over and over again?
Lets say that it takes 1 minute to open a page, access HTML Head or JS Header, paste, hits escape and press "Y" to save. Assume that every 10 minutes you need a 5 minute break, there are 300 pages to process and there are two individuals processing those.
300 pages * 1 minute * 1.5 for pause = 450 min. = 7,5 hours or less than half a day per person (including breaks!)

Let's be honest: how much time would you like to spend on programming and testing to discover that the chosen way is not the easiest (not to mention "impossible").

I am a notes developper and sometimes I also have to admit that automation is not the best option!