You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by gg...@apache.org on 2002/09/09 18:58:03 UTC

cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/layouts/html content.vm default.vm

ggolden     2002/09/09 09:58:03

  Modified:    webapp/WEB-INF/templates/vm/layouts/html content.vm
                        default.vm
  Log:
  To aid in the integration of jetspeed into a portal project,
  I want to use as much of Jetspeed "out of the box" as possible,
  minimizing the set of files I need to patch or replace.
  
  To support this, I've made a few changes to the vm templates that
  control the portal page, content.vm and default.vm, with support in
  JetspeedResources.properties and GlobalMacros.vm
  
  First, each portal page html can have a set of scripts (javascript or whataver)
  placed into the <head> section of the html.  This is done by invoking a velocity
  macro #headScripts().  This invocation is now standard in the jetspeed templates.
  
  The default headScripts() macro in GlobalMacros.vm is empty.  One would edit this or append another script by the same name with the content one wants for one's site (if there are two macros with the same name, the last one is used by Velocity).
  
  Second, each portal page html <body> tag may have onLoad or other attributes.  This is done by invoking a velocity macro #bodyOnLoad(), now standard in the
  jetspeed templates.
  
  The default bodyOnLoad() in GlobalMacros.vm is empty, and can be edited or overridden for a site.
  
  Third, the default.vm had a html title tag that included some text pre-pended to the portal page's title.  I've changed this so that there's a new jr.p field, "portalpage.title_prefix" to contain any prefix text for titles.  We can change or override this setting in the config files to control the title for our site.
  
  Revision  Changes    Path
  1.3       +5 -2      jakarta-jetspeed/webapp/WEB-INF/templates/vm/layouts/html/content.vm
  
  Index: content.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/layouts/html/content.vm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- content.vm	22 May 2002 19:39:44 -0000	1.2
  +++ content.vm	9 Sep 2002 16:58:03 -0000	1.3
  @@ -7,8 +7,11 @@
     <head>
       <base href="$clink.External" />
       <link href="$clink.setURI($config.getString("site.stylesheet")).Absolute" type="text/css" rel="stylesheet" /> 
  +## include site defined scripts for the html head (see the definition in templates/vm/GlobalMacros.vm)
  +    #headScripts()
     </head>
  -  <body bgcolor="#ffffff">
  +## include site defined body on load behavior, if any (see the definition in templates/vm/GlobalMacros.vm)
  +  <body bgcolor="#ffffff" #bodyOnLoad()>
       $screen_placeholder
     </body>
   </html>
  
  
  
  1.10      +6 -2      jakarta-jetspeed/webapp/WEB-INF/templates/vm/layouts/html/default.vm
  
  Index: default.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/layouts/html/default.vm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- default.vm	22 May 2002 19:39:44 -0000	1.9
  +++ default.vm	9 Sep 2002 16:58:03 -0000	1.10
  @@ -2,9 +2,13 @@
     <head>
       <base href="$clink.External">
       <link href="$clink.setURI($config.getString("site.stylesheet")).Absolute" type="text/css" rel="stylesheet">
  -    <title>Jakarta Jetspeed Portal: $!{data.profile.document.portlets.getMetaInfo().title} </title>
  +    #set ($titlePrefix = $config.getString("portalpage.title_prefix"))
  +    <title>#if ($titlePrefix)$titlePrefix #end$!{data.profile.document.portlets.getMetaInfo().title}</title>
  +## include site defined scripts for the html head (see the definition in templates/vm/GlobalMacros.vm)
  +    #headScripts()
     </head>
  -  <body bgcolor="#ffffff">
  +## include site defined body on load behavior, if any (see the definition in templates/vm/GlobalMacros.vm)
  +  <body bgcolor="#ffffff" #bodyOnLoad()>
       #if ($config.getBoolean("topnav.enable") == true)
       <table cellspacing="0" width="100%" border="0" cellpadding="0">
         <tr>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>