For the purpose of this recipe, we will be using the configuration example to resize the gadget.
Modify the SkypeTalk.xml
file of the previous example and add the height field, or use the web console.
Here is an example of the configuration:
<ModulePrefs author="Cookbook Developer"
title="Skype Talk"
directory_title="Skype Talk"
title_url="http://www.vige.it"
description="Speak with your friends on Skype."
thumbnail="images/SkypeTalk.gif"
height="24">
The following steps show how to do it with the web console:
By using the gadget, you can only configure the height because the layout and the skin manage all other settings. See Chapter 7, Developing Using Components API for more details. If you need to modify the width too, you could also consider transforming your Gadget into a portlet. In the next recipe, you will see how to do it.
As a portal is a combination of windows in a page, only the layout can decide the width of a portlet. GateIn provides a wide series of containers that are simple to install. You can select your container directly from the Edit Page link of the Site Editor or through the pages.xml
as a portlet. The definitions of the layouts are in the groovy file: portal/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
. Here is an example of a two-columns container:
...
column.addSelectItemOption(new SelectItemOption("twoColumns",
"<container template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">" +
" <factory-id>TableColumnContainer</factory-id>" +
" <container template="system:/groovy/portal/webui/container/UIColumnContainer.gtmpl"><factory-id>ColumnContainer</factory-id></container>" +
" <container template="system:/groovy/portal/webui/container/UIColumnContainer.gtmpl"><factory-id>ColumnContainer</factory-id></container>" +
"</container>",
"TwoColumnContainerLayout")) ;
3.139.105.159