|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building an XML based Content Management System using Lotus Domino: overview of the HTML display template (continued)
Step two: load all the XML
Once we know which page we're displaying, we can then load all the XML needed to display the page.
Step three: cascade the global values
Next up we need to cascade the global values.
What this means in English is that any given page will be displayed with the global values for the site (such as background image, site logo, text properties scheme). If, however, any individual page specifies its own values for these options, then the page level options take precedence.
For example, this means that you can build a site and change the background image for the entire site at the site level, but you may override this for any given page by specifying an alternate background image at the page level.
Step four: display the site menu
The next step is to display the site menu. There is one menu for the entire site and every page displays exactly the same menu.
The menu is displayed as text or graphics depending on how the site administrator has set it up.
Step five: display the page content
We are now ready to display the main content of the page.
This is a straightforward but lengthy process of going through each field in the XML structure, and if there is content present, displaying it appropriately. We don't display anything where there is no content to be displayed.
Step six: display site indexes
If the page contains any site indexes, then we grab the appropriate XML and display the index.
Step seven: display the bottom of page content
Finally we display the bottom of page content, including the copyright notice and the next and previous document links. We also finalize page display, close all tables, and finish up anything we need to complete the page display. This completes the HTML display template processing.
The ASP files Here are the ASP files for the system. You can see that they fairly closely correspond to the logical steps described above.
document.asp
sitegardeninit.asp
LoadXMLContentDocument.asp
LoadXMLMenu.asp
LoadXMLSiteConfiguration.asp
LoadXMLStart.asp
LoadXMLTextProperties.asp
Cascade.asp
displaymenu.asp
displaydoc.asp
displaysiteindexes.asp
displaybottomofpage.asp
|
What about images? I mentioned earlier that the images aren't available via the XML API. URLs that point to the images are contained within the XML API. These can be obtained directly from the Domino database.
This means that the client's Web browser gets the main finished HTML page from the ASP server. The returned page contains image links that point directly to the Domino server to get the images.
The main reason for doing it this way is that there's little point in going through the complex process of bringing the images into the IIS/ASP server before sending them on to the client Web browser.
It sounds a bit odd but it works smoothly.
The finished HTML page layout Okay, we're done! We've grabbed the XML from the Domino server and converted it into attractive and professional looking HTML pages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- 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. |
|
|
|
|
|
|
|
|
|
|