Liferay portlet direct URL? - url

Is it possible to query portlet interior directly from web browser? Which URL I should use given a portlet name and web application name?

AFAIK the whole point of portlets is to not generate standalone pages.
What you can do is make a page in liferay with your portlet occupying the whole page (which means apropriate theme and layout template) and pass a link to that.
Note that 'MAXIMIZED' portlet state will only maximize it to fill the portlet area in the theme, so you'll need a 'full screen' theme anyway.

Like Julien Lafont hinted in another comment, Liferay adds two window states:
Exclusive (LiferayWindowState.EXCLUSIVE)
Popup (LiferayWindowState.POP_UP)
Exclusive only outputs the portlet content, without any decoration, and without any proper html/js/css surroundings. It's useful for embedding in a DOM with those surroundings.
Popup outputs the portlet content, surrounded by all html/js/css to properly display the portlet. Used to display portlets in a popup (iframe) for example.

Related

Liferay ADT - Open Asset in a own page

In an ADT, there's a variable called viewUrl: It opens the asset inside of the AssetPublisher. Now what i want is, to open the Asset not just inside the AssetPublisher but in a new Page.. So the asset is the only thing on the page and not just between all the other webcontents.
Are there some parameters wich allow to do this?
PS: I'm using Liferay 7 and the ADT is written in Freemarker.
Thank you in advance.
You have to use the display in context setting in your asset publisher. In this case, it tried to find the best page to show the asset. I can’t explain the "best page" algorithm as it seems to differ from asset to assets. But it usually tried to show the asset where it is shown out of an asset publisher.
In the particular case of a web content, you can use the "display page" setting in the web content. For that you have to configure a page with an asset publisher that has selected the checkbox "Set as the Default Asset Publisher for This Page". Then in your web content you can set the chosen page as display page.
In your ADT you shouldn’t have anything more to do as the viewUrl should automatically direct to the new page. If you don’t want to manually set the display page on every web content creation, you can edit the structure default values to set the display page. In liferay 7 you can even set the default value for the basic web content.
you can have more detailed info on the liferay doc: https://dev.liferay.com/discover/portal/-/knowledge_base/7-0/publishing-assets#content-display-pages

Navigate from JSR286(IBM) portlet to JSF 2.0 portlet

I need to redirect with some parameter from JSR286(IBM) portlet to JSF 2.0 portlet.
I am having the page unique id and friendly url too.
I have tried response.sendRedirect() and requestDispatcher.forward() but no success till now.
Please provide me some solution.
For navigating between portlets you should not simply forward or redirect pages, since this is not the way to go. The proper way to communicate between portlets, even on different pages is to use interportlet-communication (IPC), commonly known as portlet wiring.
But it all depends on what you mean with a "JSR286(IBM) portlet". A portlet is either a JSR-286 portlet following the global specs (which are the same for all vendors, IBM, Apache, Oracle, Liferay, ...) or you have a portlet using the IBM API/iWidgets, in the last case, portlet wiring is not possible if I remember correctly from the docs.
Anyways, JSF or not, a JSF 2.0 portlet remains a JSR-286 portlet, so you can use normal events in this case as well, though I'm not experienced in JSF. Both portlets should have a portlet descriptor, in which you can declare:
The event, using <event-definition>. Please note that when your JSF-portlet is in a separate portlet application (in a different portlet.xml file), you will have to use an XName, not a normal name.
The events a specific portlet can publish, using <supported-publishing-event> (your JSR-286 portlet)
The events a specific portlet can subscribe to, using <supported-processing-event> (your JSF 2.0 portlet)
Afterwards, you can send an event in your JSR-286 portlet from within the ACTION phase, by using the ActionResponse.setEvent() method.
From the JSF 2.0 portlet, you should still be able to get the PortletRequest/PortletResponse from the context. If you check if it is an instance of EventRequest, you can retrieve the parameter using EventRequest.getEvent(), allowing you to pass parameters between portlets.
If your portlets are on separate pages, you'll have to got the Administration of WebSphere Portal (I assume you're running that since you're talking about IBM), and define global targets for the pages so that events can be triggered cross-page (otherwise wiring is only available for portlets within the same page).

Fine control over Joomla URLs

I would like to convert my existing website to Joomla. However, I need finer control over URLs than I seem to be able to control with Joomla. Assuming that Joomla is installed in the base public_html directory of my user, I would like these pages to keep their URLs:
http://dotancohen.com/howto/rtl_right_to_left.html
http://dotancohen.com/eng/genealogy.php
http://dotancohen.com/heb/contact_info.html
I am aware that I could use a 301 redirect via .htaccess however I would prefer to actually configure the canonical URL of the page. Is this possible in Joomla or with an extension?
Unquestionably, the defacto standard extension is At http://extensions.joomla.org/extensions/site-management/sef/10134. It's highly configurable, well supported, and ver well rated.
In Joomla! 2.5 you can use the built-in Redirect component to catch old URLs and send them to the right content without fiddling with the .htaccess.
You can also create menu's and menu items that will match the old paths then all you need is to place the content of your .html files into suitable articles. Remember you can create a menu (and thus a path to the content) but not display the menu anywhere on the site.
The genealogy.php appears to be a separate application so you can approach that by doing two things, first have a /eng/ directory on your new website with the genealogy.php application in it that way it will have the same URL. Then if you want to create a menu item in a Joomla! menu then you can link to it using a menu item of type 'External Link' - you can read more about the menu types by clicking on the help button in the toolbar.
[EDIT]
For external pages if you want to wrap the external application in your template use a menu item type of Iframe Wrapper this will place them in the main component area of the template. With a good Joomla! 2.5 template you can use a template style specific (i.e. layout settings) for that page.

Set help balloon text (portlet description) in custom Liferay control panel portlet

I have developed a custom Liferay portlet that appears in the control panel. The existing (Liferay-supplied) portlets all include a nice help balloon and help icon in the Portlet title bar. I'm looking for a way to add that to my custom portlet as well.
Liferay included all the help text identified by portlet name in their Language.properties file. Their control panel portlets seem to use Velocity templates, more or less hard-coding the help feature. I'm using JSF / ICE / LiferayFaces in my portlet and don't see a way of setting these values to get integrated help that looks seamless.
Help! Thanks!
Have you tried adding a javax.portlet.description.<your-portlet-name>=My Portlet to your resource bundle? The Control Panel help text is derived from the portlet's configured resource bundle and the key must follow that that convention. Also, <your-portlet-name> must match the name you used in the liferay-portlet.xml and portlet.xml files.

BrowserCMS portlet

This is probably a dumb question, but.. Any ideas how to insert BrowserCMS portlet into an actual page? What is weird, yes, I couldn't find that in their docs....
See the section Adding dynamic content via portlets in the BrowserCMS user guide
Click the 'Add Content' button on the container, choose Portlet from the 'types' and then choose the portlet you want.
adding a portlet is not quite intuitive to the beginners -
Once you have created a portlet from your command-line it will be visible in the portlet types when you click on "Add Content", or you can use a pre-designed portlet as well.

Resources