Foren

User should not be able to remove portlets from his own page!

Daniel Bados, geändert vor 13 Jahren.

User should not be able to remove portlets from his own page!

New Member Beiträge: 16 Beitrittsdatum: 07.07.10 Neueste Beiträge
Hello,

I don't want users to be able to remove certain portlets from his own private page.

I know that Liferay does not provide that feature but I am almost sure that the source code can be changed to achieve this.
I managed to restrict the access to certain portlets so that the user cannot configure or view them, however I don't know how to do this so that the user is not allowed to close/remove the portlet!

Has anyone an idea?

Thank you emoticon
Daniel Bados, geändert vor 13 Jahren.

RE: User should not be able to remove portlets from his own page!

New Member Beiträge: 16 Beitrittsdatum: 07.07.10 Neueste Beiträge
Can anyone help? Thank you emoticon
thumbnail
Sandeep Nair, geändert vor 13 Jahren.

RE: User should not be able to remove portlets from his own page!

Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
You can make portlets static by adding it in portal-ext.properties

    #
    # Specify static portlets that cannot be moved and will always appear on
    # every layout. Static portlets will take precedence over portlets that may
    # have been dynamically configured for the layout.
    #
    # For example, if you want the Hello World portlet to always appear at the
    # start of the iteration of the first column for user layouts, set the
    # property "layout.static.portlets.start.column-1[user]" to "47". If you
    # want the Hello World portlet to always appear at the end of the second
    # column for user layouts, set the property
    # "layout.static.portlets.end.column-2[user]" to "47". You can input a
    # list of comma delimited portlet ids to specify more than one portlet. If
    # the portlet is instanceable, add the suffix "_INSTANCE_abcd" to the
    # portlet id, where "abcd" is any random alphanumeric string.
    #
    # The static portlets are fetched based on the properties controlled by
    # custom filters using EasyConf. By default, the available filters are
    # user, community, and organization.
    #
    #layout.static.portlets.start.column-1[user]=3,6
    #layout.static.portlets.end.column-1[user]=14
    #layout.static.portlets.start.column-2[user]=71_INSTANCE_abcd,7
    #layout.static.portlets.end.column-2[user]=34,70
    #layout.static.portlets.start.column-3[user]=
    #layout.static.portlets.end.column-3[user]=

    #
    # It is also possible to set static portlets based on the layout's friendly
    # URL.
    #
    #layout.static.portlets.start.column-1[user][/home]=3,6
    #layout.static.portlets.end.column-2[community][/home]=14


Regards,
Sandeep
thumbnail
jelmer kuperus, geändert vor 13 Jahren.

RE: User should not be able to remove portlets from his own page!

Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
static portlets might be what you are looking for. look at the default portal.properties for documentation
Daniel Bados, geändert vor 13 Jahren.

RE: User should not be able to remove portlets from his own page!

New Member Beiträge: 16 Beitrittsdatum: 07.07.10 Neueste Beiträge
Thank you very much for your answer!

I added "layout.static.portlets.start.column-1[username]=48"
where username is the name of the user whose pages should contain portlet "48".

Unfortunately nothing appears on the user's pages.
Did I forget anything?

Thank you emoticon
thumbnail
Sandeep Nair, geändert vor 13 Jahren.

RE: User should not be able to remove portlets from his own page!

Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Hi,

It shouldnt be username, it is not individual user specific but users as a whole, so u have to write this

layout.static.portlets.start.column-1[user]=48

Regards,
Sandeep