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 Jan Kowalik <ko...@gmail.com> on 2009/06/27 13:52:46 UTC

Modification in layout and default jetspeed portlets.

Hi all,

How can I put login portlet into layout page header ( jsp  tigris
layout in particular )? I'd like to make its content visible at all
times on page header.

Second thing I wanted to ask is if I can modify registration portlet
to take only arguments I choose (I mean remove/add fields to be filled
up by registering user). BTW where/how can I access that arguments ?

Can I disable 'edit mode' button on portlet title bar and allow
switching to edit mode using my button only?


Thanks in advance for your help.

Regards
--
Jan

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


Re: Modification in layout and default jetspeed portlets.

Posted by David Sean Taylor <d....@onehippo.com>.
On Jun 27, 2009, at 4:52 AM, Jan Kowalik wrote:

> Hi all,
>
> How can I put login portlet into layout page header ( jsp  tigris
> layout in particular )? I'd like to make its content visible at all
> times on page header.
>
There is an example in vm, not jsp, see the blueocean decorator:

## For PortalFilter
#if($portalFilter)
#if($username)
                 <div>$messages.getString("portal.loginform.username")  
$username</div>
                 <div class="action">
                   <span class="button"><a href="#BaseHref()portal/my- 
account.psml">$messages.getString("portal.loginform.change_password")</ 
a></span>
                   <span class="button"><a href="#BaseHref()login/ 
logout">$messages.getString("portal.loginform.logout")</a></span>
                 </div>
#else
                 <form name="loginform" method="post">
                   <div> 
$messages.getString("portal.loginform.username") <input type="text"  
size="10" name="org.apache.jetspeed.login.username" value="" /></div>
                   <div> 
$messages.getString("portal.loginform.password") <input  
type="password" size="10" name="org.apache.jetspeed.login.password" / 
 ></div>
                   <div class="action"><span class="button"><a  
href="#" onclick="document.loginform.submit();return false;"  
onkeypress="document.loginform.submit();return false;"> 
$messages.getString("portal.loginform.login")</a></span></div>
   #if($errorcode == 2) ## ERROR_INVALID_PASSWORD
                   <div> 
$messages.getString("portal.loginform.error.invalid_password")</div>
   #end
                 </form>
#end
#end



> Second thing I wanted to ask is if I can modify registration portlet
> to take only arguments I choose (I mean remove/add fields to be filled
> up by registering user). BTW where/how can I access that arguments ?


Its not configurable at this point, you need to modify the Java code,  
see UserRegistration.vm and UserRegistrationPortlet.java in the j2- 
admin project

>
> Can I disable 'edit mode' button on portlet title bar and allow
> switching to edit mode using my button only?
>

The decorations will display any mode that is supported and securely  
accessible. To change this you may want to take a look at the  
PortletActionBar macro found in jetspeed_macros.vm:

#macro(PortletActionBar $_decoration)
  #set($_actions = $_decoration.actions)

  <div class="PActionBar">
     #foreach ($_action in $_actions)
      <a href="${_action.Action}" title="${_action.Name}"  
class="action portlet-action"  
#if($_action.target)target="$_action.target"#end><img  
src="$request.contextPath/${_action.link}" alt="${_action.Alt}"  
border="0" /></a>
     #end
  </div>
#end




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