Why make more work for yourself? Why spend your time messing with forms to reference your CSS sheets? Use the Domino Profile form to design a killer Web site that you have creative control over, a site that anyone in the office, with administrative rights, can modify if needed.
I've been using the standard Notes Profile form, instead of the standard CSS Sheets, to set fields and reference fields. You can create a Profile form that uses all the CSS functions of controlling color, font, type size and other styles. You can build in the capability to make decisions to change your pages so you don't have to slip into a page to change the design. With Notes Profile fields, you can have HTML changes that refresh instantly.
Follow these steps to use your Profile form to the fullest:
- Plan what elements you want to have easily modified as content in your Domino pages (i.e., colors for background, tables, fonts, font sizes, pictures, etc.)
- Create a Profile Form in Notes.
- Create a field for each element you want to be able to control.
For example: I created a combo-box field in the Profile form of one of my Web databases so I could control the font. I limited the choices to three fonts -- Arial, Courier and Tahoma -- then in the Input Translation event I put the formula:
@Trim(@SetProfileField("Setup";
"FType"; FType))
This identifies the Profile form as
named "Setup" and then setting the
current field "FType" as a profile field FType.
- Continue with as many fields as you like.
Consider the color codes you could use, i.e.,
#11111, etc., for color schemes, or pick your
own series of theme codes before hand.
- Save your Profile form.
- In your page or form call your
Profile field inline with your code.
One of the best ways to do this is to
call it via "Computed Text."
For example, to call your above Profile
field within your code, you could:
<font face="COMPUTEDTEXT">
The COMPUTEDTEXT would be a computed
text value that equals this:
@GetProfileField("Setup"; "FType")
When Domino reads the code, it reads the profile field value and Presto! in goes your value as if it were always there.
- Repeat in the HTML code everywhere and you've got dynamic code based on content. You won't have to rely on a designer to go in to change it regularly. You can always hide the Profile form from anyone you don't want to be able to modify the code. And you control what it's called. (Use something other than "setup" to keep it inconspicuous.)
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Jack Ward. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.