I'd like to localize "title" attribute of images administered in Document and Media library (at least the title, the description should also be localized).
My scenario:
To add images to Documents and Media library
To display the images on a page using Media Gallery portlet
To see localized title of the images
Media Gallery portlet renders the image previews with their title. The problem is the title, which is not localized.
The question is, how can I localize the title?
The same applies for folders and their names - How can I localize them?
Version - Liferay 6.2 CE
I adapted the following approach (in Liferay 6.2).
Whenever the localization is needed, I prefer to create journal articles with document attachments (possibly with custom structure).
The journal articles fully support localization and some other useful features like publication scheduling.
Related
I have installed Liferay 6.2 in my personal site. But i need Documents and Media Display view same as Liferay 6.0.6 not like 6.2 format ,Because when i click Liferay 6.2 documents at Documents and Media Display it is drive to another details page, i need to download documents when i click documents (same as 6.0.6)
If any one have HOOKs for Documents and Media Display and how to change "rowHREF" line please guide me.
You might want to consider to look into "ADT" (Application Display Templates). Some of Liferay's Portlets accept Freemarker templates for the display. For example Media Gallery does, and comes with an example in the global scope. Check if Document and Media Display has the same (or just use Media Gallery).
I am using Orchard 1.8.1 and one of the sections of the site I'm building is for a standard photo gallery. Since all the modules involving photo galleries are ancient, I opted to stay native and try using custom content types to build it instead. The way I accomplished this is with a Photo Gallery content type that has the Container part associated, then a Photo Gallery Item content type that has the Containable part associated to it.
Using the Shape Tracing tool, I was able to build out the main gallery page that shows all the individual galleries, but when you go inside a single gallery is where I get lost. The attached screenshot probably shows it best, but in the Content zone, I can see there are two individual items contained under Model.ContentItem.ContainerPart.ItemCount, however I can't figure out how to access those individual items to build a template to show them. The point of the gallery page will be implementing the gallery from Galleria, so whenever I view the individual page for the Photo Gallery content type, I need to access all child items underneath it to build this.
Any ideas?
You can use a media library picker field configured for multiple media, and then edit each image to set its caption and title. Then, it's just a matter of customizing a template override in your theme to make it look exactly the way you want.
I have installed Liferay 6.1 in my personal site.
But i need Documents and Media Display view same as Liferay 6.0.6 not like 6.1 format ,Because when i click Liferay 6.1 documents at Documents and Media Display it is drive to another details page, i need to download documents when i click documents (same as 6.0.6)
How to change 6.1 Documents and Media Display view like 6.0.6 .
Generally speaking, in order to "override" the out-of-the-box functionality of Liferay portlets you will need to hook the respective JSP pages.
The Document Display renders file entries in a search container with rowHREF(line 111) controlling the navigation to the details page. The download URL (line 473) within that page doesn't appear to use anything that you wouldn't have access too "higher" up.
So, you should be able to do something similar to the following in place of the if/else.
rowHREF = DLUtil.getPreviewURL(fileEntry , fileEntry.getLatestFileVersion(), themeDisplay, StringPool.BLANK);
Of course, this assumes you'll always want the latest version of the file. If you want to provide the ability to download "archived" versions, then I would suggest leaving the details navigation in place and consider alternative means by which to provide download functionality. For example, we use Category Navigation + Asset Publisher with a custom Display Template to allow a browsable/filterable alternative to directly exposing Documents and Media Display as we wanted to restrict that portlet's scope of use to admin-only.
I need to have the same functionality provided by the "Documents and Media display" liferay portlet but I would like to use a database other than the liferay with additional custom fields. Is It possible? Is There another portlet to display storing documents in liferay?
Anything is possible with Liferay, but this goes against a lot of basic principles of content management. Most importantly:
You want to manage content that the Content Management System (CMS) does not own
You want to use data stored in a format your CMS does not understand or maintain
If you want to use Liferay as your CMS, your best bet is to migrate the documents into the Liferay Document Library and attach your additional content using Custom Fields or 1+ custom service entities that relate back to the document and you maintain.
I'm beginner in Liferay, and I need to customize the portlet webcontent display list.
I added a portlet in my page Home, and I managed to see the recent news that I created.
The news is displayed in a table (title, author and date display).
I want to display the news like this:
- The date of the news (above the title of the news)
- The title of the news (which is a link to the news)
I tried to create a structure, but I do not see commits its work?
Thank you to enlighten me?
PS: sorry for this English !!
Liferay is available in source - did you look at the implementation of the webcontent list portlet? You can either create a jsp hook for that portlet or just reimplement a similar one based on what you find in there...
As you say you'd like to customize Webcontent display list I assume you don't want its default behaviour. Once you know what to change in this portlet, read about jsp hooks, create a hook with the jsp changes you'd like (if it's limited to jsp changes) and deploy it.
Liferay's development documentation should have the information that you need, otherwise continue in the wiki on liferay.com
Edit: Also, you might want to look at AssetPublisher - maybe this provides a few more options for formatting your output.
Generally Liferay web content in journalarticle table. I have referred Liferay 6.0 Version.
Now, for showing liferay custom portlet view, you should use Liferay Portlet Creation and Liferay Service Builder.
Here are two useful article on those -
1> Liferay MVC Portlet
2> Liferay Service Builder
Now make the service for journalarticle table and use those in your portlet.
Some useful fields of journalarticle table for your reference are - title, createDate etc.