Hi David, It's simply because $jetspeed is not available in desktop.vm. For desktop layout templates, $jetspeedDesktop is provided instead of $jetspeed. $jetspeedDesktop is type of org.apache.jetspeed.desktop.JetspeedDesktop. I think you can also use $JS2RequestContext (type of org.apache.jetspeed.request.RequestContext) to retrieve the content page and its title, etc.
Regards, Woonsan --- On Wed, 4/15/09, Mansour Al Akeel <[email protected]> wrote: > From: Mansour Al Akeel <[email protected]> > Subject: Re: #PageTitle() in Desktop.vm > To: "Jetspeed Users List" <[email protected]> > Date: Wednesday, April 15, 2009, 6:33 PM > David, I was not able to get a satisfying answer. I am > hoping someone > from the commiters can spare some time and answer the > question. > > > On Mon Apr 13,2009 10:46 am, David Just wrote: > > Thanks for the point, it got me a little farther on > the investigation > > path. > > #PageTitle() is defined in Jetspeed-macros.vm which is > parsed for > > desktop. However digging into it, the #PageTitle macro > is defined as: > > > > "#macro > (PageTitle)$jetspeed.page.getTitle($preferedLocale)#end" > > > > I went through this macro variable by variable and > $preferedLocale is > > defined as "EN" which is correct, but > $jetspeed is undefined. This means > > that any macros that used $jetspeed won't work. > > > > Anybody know what $jetspeed is supposed to be defined > to? Why it's not > > defined when running in desktop mode? > > > > > > > > David Just l Software Engineer l Vision Solutions l +1 > (507) 529-5939 l [email protected] > > The contents of this e-mail (and any attachments) are > privileged and confidential. Unauthorized use is strictly > prohibited. > > -----Original Message----- > > From: Mansour Al Akeel > [mailto:[email protected]] > > Sent: Saturday, April 11, 2009 1:35 AM > > To: Jetspeed Users List > > Subject: Re: #PageTitle() in Desktop.vm > > > > David: > > > > I am not a velocity guru, but AFAIK when this happens > it indicates that > > the macro is not defined. Taking a look at the > desktop.vm shows that > > "decorator-macros.vm is not included. > > > > Try to add this line at the begining: > > > > > > > #parse($layoutDecoration.getResource("decorator-macros.vm")) > > > > I didn't test it this one yet. Let me know if it > works for you. > > > > > > > > On Fri Apr 10,2009 12:57 pm, David Just wrote: > > > There is a #PageTitle() macro in the header.vm > that when rendered, > > > spits out the name of the page currently > displayed. This macro > > doesn't > > > seem to work when used in the desktop.vm for > rendering the destktop. > > > Instead it prints out > $jetspeed.page.getTitle($preferedLocale) . > > > Anybody have a fix? > > > > > > > > > > > > > > > > > > Thanks. > > > > > > > > > > > > David Just l Software Engineer l Vision Solutions > l +1 (507) 529-5939 > > l [email protected] > > > The contents of this e-mail (and any attachments) > are privileged and > > confidential. Unauthorized use is strictly prohibited. > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [email protected] > > For additional commands, e-mail: > [email protected] > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [email protected] > > For additional commands, e-mail: > [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [email protected] > For additional commands, e-mail: > [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
