liferayliferay-6liferay-velocity

Liferay 6 - Displaying a web content page


I'm using Liferay for the first time at my job and I'm finding it difficult to do what at first glance seemed like an easy scenario. I've just been going over countless forms and tutorials but non of them have given me the full scope or path to the solution. So here's what I'm trying to accomplish. I created a simple HTML message using Web Content that displays a message and has some pictures inside of it. When I preview this Web Content on the Control Panel it looks great. Now I just want to show this Web Content in a portal on my page. The portal will only show this single Asset (I believe its's called). So I created a 'page' of type 'Content Display Page'. I then went back to my Web Content and configured it's 'Display Page' to be the page I just created. When I go to check out my site I see a new tab on the navigation bar that has the name of the page I just created, but when I click on it, it shows a search box and under that it says "Asset Publisher" and shows all the assets we have.

How can I get this page/portal/tab to only show the single Web Content asset that I want? I keep seeing things in some tutorials about the Asset Publisher but I don't see it anywhere in the Control Panel, the only time I've seen anything that says Asset Publisher is on my actual site like I mentioned above.

I know this post is really vague, and I usually wouldn't make a post like this, but I've kind of hit a wall here. Nothing I've found has seemed entirely relevant and/or they tell me to do things on the Control Panel that I don't see. If at the very least you could point me to some documentation or tutorials that explain very clearly how to do this I would greatly appreciate that.

I've also tried just using velocity to download the Web Content directly and not use a 'page' but that didn't yield any results and after reading further I got the impression that you're supposed to use Web Content with a page and not just display Web Content directly; is that true? I'm open to any solution that gets the single Web Content Asset on my site.

Resource that I used to try and display the Web Content directly: http://www.e-kon.be/blog/item/two-ways-to-embed-web-content-in-liferay-themes

One of many resources I used to try and display the Web Content in it's own page: https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/features-of-liferays-wcm


Solution

  • I will try to elaborate in steps:

    1. Create Page:

    On clicking Add (+ button), panel will appear on left side, select Page from top menu in panel. Specify name of your page and select Empty Page (Type) and click Add Page button. Your newly created page will appear in the navigation if you didn't tick the Hide from Navigation Menu checkbox. Click on the link of the page you created from navigation to navigate.

    2. Add Portlet:

    Again click on Add (+ button), select Application from top menu in the panel. In Highlighted section Web Content Display portlet will be appearing(if not, type in the field below menu). Drag this portlet to the page or click on Add option on hovering it.

    3. Select Web Content:

    Click on Select Web Content link beside gear / settings icon of the portlet, portlet's configuration pop-up will appear. Here all of your created contents will be appearing in table. Select your desired content and click Save button.

    That's it, close configuration pop-up, and your content will be appearing on the page.