home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / DINET / ORB13DOS.ZIP / HEADER.ORH < prev    next >
Text File  |  1996-11-17  |  3KB  |  63 lines

  1. [[$/*]]
  2. HEADER.ORH -- Common header file for Orb demo pages.         
  3. -------------------------------------------------------------
  4. Standard header framework for Orb demo pages.  Ordinarily,   
  5. in real multi-page site, this file would be included by      
  6. each page to get standard top-of-page layout elements and    
  7. variable definitions.                                        
  8.                                                              
  9. The variable 'title' must be defined in the including file   
  10. before this file is included!  Note also that I've given     
  11. my own email reference, with one letter changed, as an       
  12. example of multi-level variable use -- you may wish to use   
  13. your own instead.  I intentionally miswrote mine in order    
  14. to prevent a flood of accidental mail from Orb users trying  
  15. out this example.                                            
  16.                                                              
  17. The file FOOTER.ORH contains common footer information.      
  18. -------------------------------------------------------------
  19. [[$*/]]
  20.  
  21. [[$def email    cberry@xinenet.net]]
  22. [[$def emailref HREF="mailto:[[email]]"]]
  23. [[$def contact  <A [[emailref]]>contact me</A>]]
  24. [[$def sig      <ADDRESS><A [[emailref]]>[[email]]</A></ADDRESS>]]
  25. [[$def oto      <A HREF="http://otohq.org/oto/">Ordo Templi Orientis</A>]]
  26. [[$def home     <A HREF="test1.html">Home Page</A>]]
  27. [[$def subpage  <A HREF="test2.html">Subpage Example</A>]]
  28.  
  29. <HTML>
  30. <HEAD>
  31.  
  32. <TITLE>[[title]]</TITLE>
  33.  
  34. <LINK REV="made" [[emailref]]>
  35. [[orb_generator]]
  36.  
  37. </HEAD>
  38.  
  39. [[$/*]]
  40. A nice trick is to provide a default value for things set in headers,
  41. but allow individual source files to override the default by setting
  42. a special variable before including the header.  Here, we use this
  43. technique to control page background color; test1.orb will use the
  44. default, while test2.orb sets the variable "bgc" to choose a different
  45. color.
  46. [[$*/]]
  47.  
  48. <BODY BGCOLOR=[[$val bgc "#CCCC99"]]>
  49.  
  50. [[$/*]]
  51. If we wanted to keep the actual value selected around for later reuse,
  52. a handy idiom is
  53.  
  54.   [[$def bgc [[$val bgc "#CCCC99"]]]]
  55.  
  56. This will keep the existing value of bgc if it has one, or set it to
  57. the default if it does not.  Notice also that the example above is
  58. not processed by Orb, since we're in the midst of a multi-line comment.
  59. [[$*/]]
  60.  
  61. [[$// Note the unclosed <html> and <body> opened here in this file. ]]
  62. [[$// These are closed in FOOTER.ORH at the bottom of each page.    ]]
  63.