Foros de discusión

Frustration with Web Content editor

Peter Helgren, modificado hace 6 años.

Frustration with Web Content editor

Regular Member Mensajes: 124 Fecha de incorporación: 14/11/13 Mensajes recientes
The stuff you think is going to be simple...isn't (Liferay principle #1)

I am editing web content which is simply a list of PDF files: Description in English, Description in Simplified Chinese, Description in Traditional Chinese. Each description is a link to a file in a a folder in the "Media and Documents" library. But such a simple listing seems impossibly difficult to construct! I switched the editor to CKEditor because it is simpler to use. The "Image" widget works *almost* like I want it to. I can actually (and painfully) force it to use a PDF file which comes back as a img tag which I can change to a link. Tedious, painful but doable. Is there an easier way? I tried adding a CKEditor plugin but the instructions are vague and not well explained. I tried adding PDF as an image type so I could at least see the pdf files when the image widget is used. No joy.

It would seem to me that having a widget that creates a link to a Liferay resource would be a "standard" widget in the web content editor. So, here are my questions:

1) Is there an easy way to add links to web content when the file isn't just an image or video ?
2) Is there an easy way to get just the URL reference to the file in the document folder - I could copy each of them and paste them into links - again tedious but doable.
3) Has anyone had success in adding a CKEditor plugin in LR 7.0? Is that code posted anywhere? I have read this and this without much luck.
4) Any other way to skin this cat?

The "Documents and Media" feature makes it quite easy to get the content into LR 7.0 but formatting web content and referencing that useful content is a bear....
thumbnail
Christoph Rabel, modificado hace 6 años.

RE: Frustration with Web Content editor

Liferay Legend Mensajes: 1554 Fecha de incorporación: 24/09/09 Mensajes recientes
I think you should use a structure and a template to solve your problem.
https://dev.liferay.com/discover/portal/-/knowledge_base/7-0/designing-uniform-content

Create a structure with a text field description and a document field. You can put the document field "in" the text field. And make the text field repeatable.

Write a template to display the list you have constructed. Of course, you need to be able to write some html, but once you have written it, adding and editing entries becomes easy. You just create a new webcontent of your structure type and enter the fields "Description + Document" as many times as you want in as many languages as you want.
Peter Helgren, modificado hace 6 años.

RE: Frustration with Web Content editor

Regular Member Mensajes: 124 Fecha de incorporación: 14/11/13 Mensajes recientes
Thanks...I have been pondering this approach. I was hoping to use what LR 7.0 already had, out of the box, without having to write any additional modules. Indeed, a custom approach is what we are using in our 6.0.6 code base ...I was just hoping to avoid writing custom code. We have several different "flavors" of this pattern so I'd to to create diffrent structures and templates for each implementation.

I am still pursuing creating a ckeditor plugin to make the job a little easier but if I get stuck (I am stuck a bit right now) then I just take your approach.