Is it possible to replicate the 'add page' link outside of the dockbar?
It is possible to replicate the 'add application', 'control panel', 'toggle controls' and 'page layout' links outside of the dockbar by adding javascript to main.js.
This question hasn't been answered on the Liferay forums as yet so I thought I'd try here.
The following are for Liferay 6.1 (earlier versions my differ but it's a starting point):
Control Panel
You can use the following URL:
http://yourliferaysite.com/group/control_panel?doAsGroupId={groupId}&refererPlid={plid}
Where you replace {groupId} with the Group ID of the community you're currently accessing, and replace {plid} with the plid of the page (layout) that you're currently on. Note that the plid is NOT the Layout Id and can be found in the database in the layout table.
Edit Controls / Toggle Controls
You need to add and remove the following CSS classes from the
<body>
tag.
The classes are
These can both be added and removed easily using jQuery's addClass and removeClass methods.
$('body').removeClass('controls-visible').addClass('controls-hidden');
This will hide the controls, and the vice versa will show the controls.
or using Alloy UI:
AUI().use('node', function(A) {
A.one('body').replaceClass('controls-visible','controls-hidden');
}
Add Page
I'm afraid this I also don't know how to do. It must be buried somewhere in the Alloy UI libraries but I can't debug how it works! Sorry!
Hopefully the first two will prove useful!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With