Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Carlo Cavallieri
[RESOLVED]portlet on top of the banner
March 13, 2008 1:34 PM
Answer

Carlo Cavallieri

Rank: Junior Member

Posts: 69

Join Date: March 7, 2008

Recent Posts

Hi all,

is possible to render a specific portlet on the top of the site (before the banner and the naviagation)?

I need this because i want to add a dinamic "banner ads" and i need a portlet to connect to the DB and get the appropriate one based on certain rules.

I've read somewhere about a $theme.runtime("portlet-id"), but i can't find any documentation about the $theme velocity variable...
Rafael Cervantes
RE: portlet on top of the banner
March 12, 2008 7:57 AM
Answer

Rafael Cervantes

Rank: New Member

Posts: 2

Join Date: February 27, 2008

Recent Posts

I have exactly the same question.
I hope we get an answer soon.
Ray Augé
Re: [Liferay Forums][4. Custom Theme Development]RE: portlet on top of the
March 12, 2008 8:14 AM
Answer

Ray Augé

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1195

Join Date: February 7, 2005

Recent Posts

Look for com.liferay.taglib.util.VelocityTaglib which has the
following methods:
 1    public String runtime(String portletName)
 2        throws Exception {
 3
 4        return runtime(portletName, null);
 5    }
 6
 7    public String runtime(String portletName, String queryString)
 8        throws Exception {
 9
10        _res.recycle();
11
12        RuntimeTag.doTag(portletName, queryString, null, _ctx, _req, _res);
13
14        return _res.getString();
15    }
16
17    public String runtime(
18            String portletName, String queryString, String defaultPreferences)
19        throws Exception {
20
21        _res.recycle();
22
23        RuntimeTag.doTag(
24            portletName, queryString, defaultPreferences, null, _ctx, _req,
25            _res);
26
27        return _res.getString();
28    }


Note:
- The portletName must be fully qualified for its application context
and contain an instance Id if it is instanceable like:
warname_WAR_portletName_INSTANCE_instanceId
- The "optional" queryString, which can include window state and
portlet mode, must have portletNamespace encoded params.
- The "optional" defaultPreferences String, must be a well formed
xml like:
1<preferences>
2    [<preference>
3        <name>...</name>
4        [<value>...</value>]*
5    </preference>]*
6</preferences>


Hope that helps!
Carlo Cavallieri
RE: Re: [Liferay Forums][4. Custom Theme Development]RE: portlet on top of
March 13, 2008 12:30 AM
Answer

Carlo Cavallieri

Rank: Junior Member

Posts: 69

Join Date: March 7, 2008

Recent Posts

thanks
delang j
RE: Re: [Liferay Forums][4. Custom Theme Development]RE: portlet on top of
November 15, 2008 3:52 AM
Answer

delang j

Rank: Regular Member

Posts: 235

Join Date: July 13, 2008

Recent Posts

hi ray,
actually i couldnt get it. could you give an example?

thanks
delang j
RE: [RESOLVED]portlet on top of the banner
November 17, 2008 7:48 AM
Answer

delang j

Rank: Regular Member

Posts: 235

Join Date: July 13, 2008

Recent Posts

i tried with this $theme.runtime("portlet-id"), but it seem look and feel button not functioning. And how do i disable border. is it a bug or not?

thanks
henok negash
content menu height
January 18, 2010 4:40 AM
Answer

henok negash

Rank: New Member

Posts: 1

Join Date: January 18, 2010

Recent Posts

Carlo Cavallieri:
Hi all,

is possible to minimize the height of the content menu height?i am trying to minimize by giving the height 5%,but it does not work.