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 aordin <ao...@disid.com> on 2006/10/30 14:01:16 UTC

Two questions about layouts. Define and set default.

Hi for all!

I'm sorry if my questions is answered in other message but Imolt be'm 
searching for it and i don't find the solution.

In first time I'm trying for customize jetspeed2, and i'm searching how 
can i put one layout and theme as default? now my default layout is 
velocity two columns and tigris theme, I can put another layout  and 
theme as default in one page when i'm admin, but when i create one new 
page the default layout is two columns and the theme is tigris. I change 
the layout.vm (/templates/layout/columns/)  and i deploy the templates 
but the changes don't take effect when i create one new page. Someone 
can help me?

   The second question, is  about how i can create or modify one 
velocity layout? i'm searching for one HowTo but i d'ont see it.

Thank you very much!!!

Adolfo Ordiñana
DiSiD technologies.
www.disid.com

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


Re: Two questions about layouts. Define and set default.

Posted by aordin <ao...@disid.com>.
David Sean Taylor wrote:
> The customizer seems to default to the layout and theme(page 
> decorator) of the current page. Not a great solution, agreed. Steve 
> and I working on a new customizer. We will add this requirement to the 
> new feature set.
>
> In the meantime, you could change MultiColumnPortlet.java, around line 
> 275 to do something like:
>
>                             layout = request.getParameter("layout");
>                             Page page = pageManager.newPage(path);
>
> or even better, have default settings in the portlet itself (init 
> params or prefs)

Thank you very much Ruben and David!!!

Finally I change the MultiColumnPortlet.java like this:

    String layout = request.getParameter("layout");
    String theme = request.getParameter("theme");
    String decorator = request.getParameter("decorator"); //this line 
isn't tested because in this moment we haven't custom decorator for portlets
        Page page = pageManager.newPage(path);
        // TODO: Get System Wide defaults for decorators
        page.getRootFragment().setName(layout);
        page.setDefaultDecorator(theme, Fragment.LAYOUT);
        page.setDefaultDecorator(decorator, Fragment.PORTLET);//here I 
change "tigris" inverted commas included (default) for decorator but 
isn't tested for the up reason)
        page.setTitle(jsPageName);
        pageManager.updatePage(page);


After this, I execute maven to create the  jetspeed-layouts-2.0.jar and 
I copy it into WEB-INF/lib/  of the execution environtment(Tomcat) and 
restart Tomcat for changes take effect. All works like I want.  Thank 
you one more time :)

Ruben wrote:

First of all the setting for the default theme for a page and a portlet is
located in the file;


		\jetspeed\WEB-INF\conf\jetspeed.properties


Thank you Ruben but this solution isn't good for I want because, when I 
make one new page with customizer, it ignore this options. But thank 
you, may be good for other people!

-- 

Adolfo Ordiñana
DiSiD S.L.L.
http://www.disid.com

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


Re: Two questions about layouts. Define and set default.

Posted by David Sean Taylor <da...@bluesunrise.com>.
aordin wrote:
> Hi for all!
> 
> I'm sorry if my questions is answered in other message but Imolt be'm 
> searching for it and i don't find the solution.
> 
> In first time I'm trying for customize jetspeed2, and i'm searching how 
> can i put one layout and theme as default? now my default layout is 
> velocity two columns and tigris theme, I can put another layout  and 
> theme as default in one page when i'm admin, but when i create one new 
> page the default layout is two columns and the theme is tigris. I change 
> the layout.vm (/templates/layout/columns/)  and i deploy the templates 
> but the changes don't take effect when i create one new page. Someone 
> can help me?
> 
>   The second question, is  about how i can create or modify one velocity 
> layout? i'm searching for one HowTo but i d'ont see it.
> 
The customizer seems to default to the layout and theme(page decorator) 
of the current page. Not a great solution, agreed. Steve and I working 
on a new customizer. We will add this requirement to the new feature set.

In the meantime, you could change MultiColumnPortlet.java, around line 
275 to do something like:

                             layout = request.getParameter("layout"); 

                             Page page = pageManager.newPage(path);

or even better, have default settings in the portlet itself (init params 
or prefs)

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


Re: Two questions about layouts. Define and set default.

Posted by David Sean Taylor <da...@bluesunrise.com>.
Ruben Fragoso wrote:
> First of all the setting for the default theme for a page and a portlet is
> located in the file;
> 
> 
> 		\jetspeed\WEB-INF\conf\jetspeed.properties

If you are using the customizer, it will not use the properties
The setting above is for pages created 'by hand'
This setting is only applied when you have no default settings on a page
When using the customizer, this is not the case

> 
> About the second question, you can find a tutorial on velocity in the
> jetspeed home page, and you have to know html to, it helps ;)

Thanks, and sorry I missed your second question.

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


RE: Two questions about layouts. Define and set default.

Posted by Ruben Fragoso <ru...@tap.pt>.
First of all the setting for the default theme for a page and a portlet is
located in the file;


		\jetspeed\WEB-INF\conf\jetspeed.properties

About the second question, you can find a tutorial on velocity in the
jetspeed home page, and you have to know html to, it helps ;)


To learn create a copy of the tigris theme, and change at will, that was how
i learned to ;)



-----Original Message-----
From: aordin [mailto:aordin@disid.com] 
Sent: segunda-feira, 30 de Outubro de 2006 13:01
To: Jetspeed Users List
Subject: Two questions about layouts. Define and set default.


Hi for all!

I'm sorry if my questions is answered in other message but Imolt be'm 
searching for it and i don't find the solution.

In first time I'm trying for customize jetspeed2, and i'm searching how 
can i put one layout and theme as default? now my default layout is 
velocity two columns and tigris theme, I can put another layout  and 
theme as default in one page when i'm admin, but when i create one new 
page the default layout is two columns and the theme is tigris. I change 
the layout.vm (/templates/layout/columns/)  and i deploy the templates 
but the changes don't take effect when i create one new page. Someone 
can help me?

   The second question, is  about how i can create or modify one 
velocity layout? i'm searching for one HowTo but i d'ont see it.

Thank you very much!!!

Adolfo Ordiñana
DiSiD technologies.
www.disid.com

---------------------------------------------------------------------
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