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 Elif Guner <el...@gmail.com> on 2006/10/02 18:38:18 UTC

Reading page-navigations using Velocity portlet

Hi,

I have a simple velocity portlet which reads in the page-navigations
and makes a list of links that i use as a left menu. When I use the
same portlet in other pages that belong to another folders I have no
problem. When I use it within the folder it's supposed to be in, I get
a null menu. I can't figure out why. Can anyone help me find out what
the reason might be?

Here's my portlet's view.vm:

#set($site = $request.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext"))
#set($navigationsStandardMenu = $site.getMenu("page-navigations"))
#set($preferedLocale = "en")
#if(!$navigationsStandardMenu.empty)
    <div id="leftmenu" >
    <ul>
    #foreach($element in $navigationsStandardMenu.elements.iterator())
        #set($linkUrl = $site.getAbsoluteUrl($element.url))

        #set ($linkUrl2 =
"${request.scheme}://${request.serverName}:${request.serverPort}/jetspeed/portal$element.url")
        #set($linkTitle = $element.Title)
        <li><a href="$linkUrl2" class="Link" title="$!linkTitle">$linkTitle</a>
    #end
    </ul>
    </div>
#end
#if($navigationsStandardMenu.empty)
   <div id="leftmenunull">
   MENU IS NULL!
   </div>
#end


And here's my folder.metadata:

<?xml version="1.0" encoding="UTF-8"?>

<folder>

  <title>Oil & Gas Network</title>



  <document-order>home.psml</document-order>
  <default-page>home.psml</default-page>
  <!-- temporary menu definitions for jscookmenu layout decorator;
will be standard-->



  <menu name="page-navigations" regexp="true"
options="/oilgas/home.psml,/oilgas/subscribers.psml,/oilgas/advertisers.psml,

        /oilgas/events.psml,/oilgas/featurearticle.psml,/oilgas/mediakit.psml,/oilgas/supplement.psml,/oilgas/about.psml,

        /oilgas/contact.psml"/>

  <security-constraints>

    <security-constraints-ref>public-view</security-constraints-ref>

  </security-constraints>

</folder>


Thanks very much...
Elif

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


Re: Reading page-navigations using Velocity portlet

Posted by Elif Guner <el...@gmail.com>.
No, please don't waste any time with that. I am sorry I was busy and I
forgot to keep you guys updated. I fixed it. I had some extra blank
spaces in my folder.metadata that I hadn't noticed before. So it's
working fine now.
Thanks very much and I hope you haven't spent any time on it yet...
Elif

On 10/2/06, David Sean Taylor <da...@bluesunrise.com> wrote:
> Elif Guner wrote:
> > Hi,
> >
> > I have a simple velocity portlet which reads in the page-navigations
> > and makes a list of links that i use as a left menu. When I use the
> > same portlet in other pages that belong to another folders I have no
> > problem. When I use it within the folder it's supposed to be in, I get
> > a null menu. I can't figure out why. Can anyone help me find out what
> > the reason might be?
> >
> Nothing obvious, looks ok to me
> I'll try to reproduce it later tonight
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

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


Re: Reading page-navigations using Velocity portlet

Posted by David Sean Taylor <da...@bluesunrise.com>.
Elif Guner wrote:
> Hi,
> 
> I have a simple velocity portlet which reads in the page-navigations
> and makes a list of links that i use as a left menu. When I use the
> same portlet in other pages that belong to another folders I have no
> problem. When I use it within the folder it's supposed to be in, I get
> a null menu. I can't figure out why. Can anyone help me find out what
> the reason might be?
> 
Nothing obvious, looks ok to me
I'll try to reproduce it later tonight

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