Profile forms for CSS sheets

Profile forms for CSS sheets

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:

  1. 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.)

  2. Create a Profile Form in Notes.

  3. 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

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

  1. FType.

  2. 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.

  3. Save your Profile form.

  4. 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.

  5. 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.

This was first published in March 2005

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.