掲示板

Accessing configuration options when use-default-template=false

thumbnail
10年前 に Dave Weitzel によって更新されました。

Accessing configuration options when use-default-template=false

Regular Member 投稿: 208 参加年月日: 09/11/18 最新の投稿
We have a portlet that has to be configured with:
<use-default-template>false</use-default-template>
in liferay-portlet.xml so that it can be included in another portlet's jsp page using the liferay-ui:runtime tag

However when it is deployed by itself we need to be able to configure various options that it supports.

Is there a way of effectively saying dont use the default-template for the one instance of the portlet that is included in the jsp file?

I cannot find a suitable portletPreference but then again there is no list that I am aware of values used by the core liferay capabilities.

Any other ideas?

Thanks
thumbnail
10年前 に Stefan Brötz によって更新されました。

RE: Accessing configuration options when use-default-template=false

Junior Member 投稿: 76 参加年月日: 10/02/01 最新の投稿
Hi Dave,

if you disable "use-default-template" then Liferay is doing exactly what you requested: It does not display any default controls and only shows the content created by the portlet's render() method.

So if you need to have a configuration link (or a remove button or any other control present in the default template), your portlet has to render it on its own.

Best, Stefan.