留言板
Creating a link to portlet
Hi,
I would like to create a link to one of the Liferay's portlets. I'd like to add in my theme a link, which is invoking "Add bookmark" form from Bookmarks Portlet. How can I achieve that i my freemarker template?
I would like to create a link to one of the Liferay's portlets. I'd like to add in my theme a link, which is invoking "Add bookmark" form from Bookmarks Portlet. How can I achieve that i my freemarker template?
I'd suggest to create a portlet that
Then you can embed this portlet in your theme.
- renders the link (or whatever you need)
- uses BookmarksEntryLocalService to save the bookmark
Then you can embed this portlet in your theme.
So there's no way to call directly Bookmarks portlet?
There is. You need to place the portlet on some public page and construct Action URL to it. But then when you click on the link you'd go to that page. Having custom portlet is just much cleaner way to solve the same problem. Alternatively you could simply have the link call it's jsonws service (see http://<YOUR_DOMAIN>/api/jsonws?contextName=bookmarks)