[Building Sakai] Change layout of the gateway page

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Wed Jul 15 03:37:02 PDT 2009


Hi Nerru,

Ok this will require more work to detect if you are on the !gateway  
site or not. I'd suggest taking a copy of the macros.vm and calling it  
gateway.vm, then adding in some logic into SkinnableCharonPortal.java  
so it adds into the context for the page a parameter for if the page  
is on on the gateway, and uses that template prefernetially. I thought  
there was a method that you could call to check if you were on the  
gateway but I can't seem to find it right now. Else you might just  
need to check the siteId of the site you are on (!gateway is a site).

This may be uncharted territory though. There may be others that have  
done this.


cheers,
Steve





On 15 Jul 2009, at 11:26, Neeru Joshi wrote:

>
> Hi Steve,
>
>   I am using sakai 2.5.4. and I found macros.vm & others in the folder
> you've mentioned. But it looks like the same macros.vm file is used to
> render all pages, so if i comment anything here (for the gateway  
> page) it
> will affect all of them. Again modifying the css for this also leads  
> to the
> same problem. I want to change only the gateway page. Moreover, on  
> using
> display:none, i still get the alt text ie. for logo it will show  
> "logo" on
> the screen if not the image.
>
>   I have tried to bypass the gateway page (by removing .anon role)so  
> that a
> user is taken straight to the login page, which will be my custom  
> page that
> I want. So thats one problem solved...don't know if its the best  
> approach...
> But after successful login I want a separate page to be displayed  
> which will
> contain an image...an image map actually. So the links on image will  
> take
> the user to the sakai portal...the page that comes on usual login. At
> present I am planning to achieve this by changing the returnUrl in
> LoginTool.doPost() , again is this a good idea?
>
> Thanks,
> Neeru
>
>
>
> Steve Swinsburg-2 wrote:
>>
>> Hi Neeru,
>>
>> You've found the velocity templates in portal/portal-render-engine-
>> impl/pack/src/webapp/vm/defaultskin/* right? In 25.x and earlier,
>> macros.vm did pretty much everything, in 2.6.x+ its split into a  
>> bunch
>> of include*.vm templates. They are appropriately named
>> (includePageNav, includePageTabs etc) so you should be able to just
>> uncomment the ones you don't want from the #parse('/path/to/ 
>> template')
>> so they aren't included. Or modify parts so they don't render. For
>> 2.5.x, just work on the macros.vm.
>>
>> You will also need to make adjustments to the portal.css for the
>> default skin so it doesn't set out spaces for the parts that aren't
>> going to render. In fact, you could do all of this with CSS just by
>> setting display:none on the elements you want hidden. That might be
>> the easiest option.
>>
>> So two options for you, depending on exactly what you need to do.
>>
>> cheers,
>> Steve
>>
>>
>>
>>
>> On 15 Jul 2009, at 04:50, Neeru Joshi wrote:
>>
>>>
>>> Hi everybody,
>>>
>>> I need to change the gateway page layout...i.e. I need to remove
>>> the side
>>> panel (page links), the logo and the banner. What i am trying to  
>>> do is
>>> display an image...this will cover most of the screen, and the login
>>> form
>>> provided by sakai. I am new to velocity, but I have read and got
>>> some idea
>>> about it. But the problem is the deadline, so if someone could  
>>> help me
>>> understand how sakai reders the pages, I would really appreciate it!
>>>
>>> Thanks,
>>> Neeru
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Change-layout-of-the-gateway-page-tp24491495p24491495.html
>>> Sent from the Sakai - Development mailing list archive at  
>>> Nabble.com.
>>>
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to
>>> sakai-dev-unsubscribe at collab.sakaiproject.org
>>> with a subject of "unsubscribe"
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>> "unsubscribe"
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Change-layout-of-the-gateway-page-tp24491495p24495278.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org 
>  with a subject of "unsubscribe"



More information about the sakai-dev mailing list