You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Gerry Reno <gr...@yahoo.com> on 2003/11/24 21:34:48 UTC

Velocity reference problem in navigation file

  In one of my portals in top.vm I've added another velocity reference
to extract from a properties file.  And when I try to use it, it works
just fine, but, the first reference to the logo file that was
originally there stops working.  If I comment out my new code, the
original reference works fine again.

>From top.vm:
#if ($config.getString("topnav.logo.file"))
  #set ($LogoFile = $config.getString("topnav.logo.file"))
  #set ($LogoURI = $clink.setURI("$LogoFile").Absolute)
#else
  #set ($LogoURI = $config.getString("topnav.logo.url"))
#end
## Added by GR
## Calculate the URI for the logo background image - optional
##
#if ($config.getString("topnav.logo.background.file"))
  #set ($LogoBGFile = $config.getString("topnav.logo.background.file"))
  #set ($LogoBGURI = $clink.setURI("$LogoBGFile").Absolute)
#else
  #set ($LogoBGURI = $config.getString("topnav.logo.background.url"))
#end

---------------------
When both references are present, the served page displays:
<td ...  background="/portal/images/logobg.gif" >
<img border="0" alt="Home" src="/portal/">

When only the original reference is present, the served page displays:
<td ...  background="" >
<img border="0" alt="Home" src="/portal/images/logo.gif">
---------------------

  I do not understand Velocity that well (mostly use JSP/Struts) so is
there something else I need to do to make this work, or is this a bug?

  This behavior is the same for 1.4-b4, 1.4, 1.5-dev

Gerry Reno


=====
Gerry Reno
mailto: grenoml at@ yahoo dot. com
(if mail bounces please retry later - spam rapidly fills up mailbox)

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org