Liferay: Instanceable portlet company-wide preferences - layout

Is there any way to get 2 instances of an instanceable portlet with different preferences, be shared across all layouts for each one?
I mean portlet A Instance 1 is placed in all communities and it shares preferences for all layouts where it is placed
Portlet A Instance 2 is placed in a subset of those communities and it shares preferences for all layouts where it is placed
Or maybe is it that the relation between a portlet and its image in another layout is exactly the same as the relation between 2 instances in same page (no connected at all)?
Its a bit confusing telling between per-page instance and per-layout instance then.
Is it the last option totally duplicate portlet and set company-wide preferences for each instance?

Adding as answer:
With such a complex requirement, it may be best to "cheat" and declare two instances of the same portlet in the portlet.xml and liferay-portlet.xml so you can control the preferences independently

Check out http://docs.liferay.com/portal/6.0/definitions/liferay-portlet-app_6_0_0.dtd.html#preferences-unique-per-layout as it has a good discussion of preferences-unique-per-layout and preferences-owned-by-group and how they interact with each other

Related

How to edit default portlet in Liferay 7 Control Panel?

Is it possible to edit portlet/page in Control Panel in Liferay 7.0 ga4?
In my case, I want to add a custom column in Users table in 'Users and Organizations' section.
Yes, it's possible, and you do so just like you'd do for any other stock portlet. While there are extra mechanics to make them appear in control panel, you don't need to get in contact with these if you just modify.
Inspect the Dom to get a hint for the portlet that you're looking for.
An alternative that'd be better maintainable would be to write your own portlet instead of modifying an existing one. But that's not what you ask for here.

Liferay - Adding Page

I am using Liferay 6.1.0 GA1.
When You go to Add -> Page there is a popup list which show you type of new site and it is ugly.
Where I can hide it? I want to remain only accept button.
Edit: I want to hide only if it is really hard to remove it.
you could use an custom theme on your page and use CSS to hide it.
You're mixing up a few terms. I'm assuming that you mean the list of page templates, e.g. when you create a new top level page, you see the page templates "Blog", "Forum" or similar (I can barely remember them from 6.1 times). These are PageTemplates. You can remove all PageTemplates (implying that you won't be able to use them any more) and they won't be offered any more.
Other than that I agree with dube - IMHO it's enough to just hide it with CSS. Only the administrator, who is able to create a new top level page (and when they create a new top level page) will see them anyway. So it's not the regular usecase and just hiding them in CSS does not impose any security issue.

Placement of portlets on a liferay page

I am using 1-2 Columns (70-30) layout for the page in liferay. The problem that I am facing is that I am not able to place them properly in 1-2 columns form even after dragging them properly on the page. I am making use of web content portlets. The portlet that should be placed on '30' side;its data appears the way I want on the RHS but the portlet window covers the entire screen. How should I place the portlets to get the exact 1-2 columns layout?
EDIT:
Is it possible to place a portlet over another portlet?
If the portlets that you are trying to place are custom portlets, It may be worth checking if custom css width property forcing portlet to occupy more width than supposed.
You can't place one portlet over another portlet. But "Nested Portlet" can be used to include more than one portlet in their own layout.
As you don't have public URL, I can only suggest steps to debug your issue.
Login to portal as Administrator.
Create a new page.
Apply liferay default classic theme to the page and apply 70-30 layout.
Add one Web content display portlet instance in column 1 and another in column 2.
Checkpoint: Enable Edit checkbox and see if the default portlet boundaries are occupying width they are supposed to take. If yes, then your liferay default working fine.
Checkpoint: Select your web content article and see if width of display changes. If Yes, then the problem is with with your web content article.
Checkpoint: Apply your theme and then see the issue. Then issue may be with your custom css files in _diff folder.
Use Firebug in Firefox or chrome dom viewer (F12 in chrome window) and observe which CSS style is causing the issue.

Hide Liferay control panel options form users

I am developing a liferay portlet using liferay6.1 and SDK for Java.
When user logs in and they click on control panel they can see all kind of options. Is there a way to hide this options?
I am still new but i think that you can hide it from the portal.ext.properties but I am not sure and I have no idea.
Any help will be appreciated!
Thanks in advance!
You can show/hide control panel entries by implementing the interface com.liferay.portlet.ControlPanelEntry. This interface defines a couple of methods (isVisible/hasAccessPermission) that determine if a particular user sees/has access to one of the control panel entries.
The association between a portlet and its ControlPanelEntry class is defined in the liferay-portlet.xml configuration file. To override its value, you must use the ext-plugin.
Take a look at http://www.liferay.com/dtd/liferay-portlet-app_6_1_0.dtd for more information (search for control-panel-entry).
The configuration can be do by role-permissions of user and power-user. Go to "Control Panel" -> "Roles" -> Looking for User-Role (then Power-User) -> Define Permissions. Disable in area "Permission for Control Panel" the View-Permission for Items that must be hide.
Over.
Hide and disable access to liferay control panel
This blog will help you

How do I organise 3rd and 4th level navigation

I'm attempting to structure multiple levels of site navigation by using the "Modify Navigation" setting (Site Actions > Site Settings > Modify Navigation)
But it seems the UI on that page doesn't let me create pages which are children of other pages, or create folders which are children of other folders.
Basically, I need to create not just first level/second level nesting, but also 3rd and 4th level nesting of pages
I understand the parameters to so in the default.master to control if other levels are displayed, but I can't figure out how to create such a structure in sharepoint?
Am I completely missing the point?
Out of the box, there are no "sub-pages" in navigation in MOSS. The nested navigation which Heather Solomon describes in this article is about how you create multi-level navigation of a known site/subsite hierarchy.
If you need pages and sub-pages in your navigation, you will have to create a custom editor which allows you to define the needed hierarchy, as well as you will have to create a custom "navigation provider" which knows how to navigate the hierarchy.

Resources