I need to send by email the link of the contents in a custom Portlet in Liferay.
How can I obtain the URL for every content my portlet shows?
It possible to make it in the view or have to be an Action to create the URL?
Thanks in advance
"The link of content" does not really map to Liferay concepts: You have content and that content can be displayed on any number of pages. You can either try to find one page where the content is displayed, or (for Web Content) use the "Content Display Page" which chooses a particular page as the context for this article.
If you are using a custom ADT, you might want to add it to your question, so that we know what you're talking about. If it's too long, feel free to simplify it.
Related
Many ios apps contain a FAQ or How to use page, when loaded, will display some FAQs in text format. The content is loaded from remote server rather than built in so the contents can be updated anytime with flexibility.
What's the best way to implement this type of page? My app does not contain any server side function except this page so I am really looking for a cheap (or free) way instead of renting a server just for this. Also, my FAQs will be static HTML.
Thank you for any suggestions.
The simplest way to display an HTML page is to use a UIWebView as the main view of your view controller and set its URL or file-path using the loadRequest() method of your view.
You can use this method for both remote FAQs (in this case you'll set an URL) and local and static ones for which you'll use a path to the file included in your project.
I used EpiServer CMS. I'm just wondering if n2cms has any attribute to collect links. (like LinkItemCollection in EpiServer). If not, Please give me an idea to implement.
Reference: http://sdk.episerver.com/library/cms6/Developers%20Guide/Core%20Features/Properties/How%20To/Use%20Link%20Collection%20property.htm
Thanks.
You could do this with the ContentList part and creating a bunch of redirect pages. This is best if you want to re-use the collection of links again and again.
Create a dummy placeholder page somewhere, and make it invisible.
Under that placeholder page, create a Redirect page for each link.
Where you want the collection of links to appear, drag & drop a ContentList and point the root at the dummy placeholder page. You can then write a custom HTML template to display the link however you like.
One other idea would be to use N2CMS Selection part, which gives you a checkbox list of all the pages in your site. You simply check the ones you want to list, and Selection will format a list of all the pages you checked.
With both of these methods, if you link to other pages in your site, N2 will offer to update links for you if you rename any of the target pages (as long as they're in the same N2 site).
All of this is documented in the N2CMS documentation here: https://n2cmsdocs.atlassian.net/wiki/display/N2CMS/Linking+to+Content?src=search
Look under the heading Dynamically Linking to Content Items
I need to create a page with two portlets. The first one will need to change the url source of the second iframe portlet on click. However, the requirement is that the page should not be reloaded.
Is it possible to implement? If yes, then how?
I read from iframe documentation that the page can be changed, but it requires the page to be reloaded.
Personally, I prefer doing it Ajax way rather than iframe, in JSR 268 Inter portlet communication can be achieved. for more details, you can visit this link.
http://www.liferay.com/community/wiki/-/wiki/Main/Inter-portlet+communication
I have a need to render content from another page using a content query web part. I've found several examples on how to accomplish custom fields using common-view-fields but nothing specific on how to query page content from another page.
Is this possible?
Thanks,
Eric
"Content Query Webpart" is typically used for aggregation - you have a lot of pages in your portal and you want to create a page which summarizes the headlines or some other properties that every item in your portal has.
In your scenario, as far as I understand, you have a page in your portal and you want to create another page, which displays the same content. In this case the "List form webpart" or a "data view webpart" would sound more reasonable.
If I have a link say http://yahoo.com/ so can I get the links inside yahoo? For example, I have a website http://umair.com/ and I know there are just 5 pages Home, About, Portfolio, FAQ, Contact so can I get links as follows programmatically?
http://umair.com/index.html
http://umair.com/about.html
http://umair.com/portfolio.html
http://umair.com/faq.html
http://umair.com/contact.html
Define what you mean by "links inside yahoo".
Do you mean all pages for which there is a link to on the page returned by "http://www.yahoo.com"? If so, you could read the HTML returned by an HTTP GET request, and parse through it looking for <a> elements. You could use the "HTML Agility Pack" for help.
If you mean, "All pages on the server at that domain", probably not. Most websites define a default page which you get when you don't explicitly request one. (for example, requesting http://umair.com almost certainly returns http://umair.com/index.html). Very few website don't define a default, and they will return a list of files.
If you mean, "All pages on the server at that domain, even if they define a default page", no that cannot be done. It would be an extreme breach of security.
This could be done by a Web Crawler, read some basic information about it:
http://en.wikipedia.org/wiki/Web_crawler
Includes Open Source crawlers, see if any of them is what you are looking for.