7.3 - Idea: Filtered list of pages

thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
Based on the discussion on display pages, I'd like to throw an idea in the room.

Current concept:

Create a structure Event (I just counted, it has 29 fields, most optional, some repeatable)
Create a really complex template
Add a "default assetpublisher" to create a display page
Add a "list preview assetpublisher" to display the newest 3 events
Create an ADT to show the event preview as a card (with image or video)
Editor creates new Events, struggles with the 29 fields

Done.

Editor is somewhat happy (with the 29 fields ...)
Till he has the problem that for this specific event he needs ... field 30 ...

Idea:
Why not turn the concept on the head?

We have an Asset Publisher, how about a "Pages Publisher"? (Should basically have the same filter options)
(Btw.: I always wondered, why pages aren't Assets).


Create a "page type" Event (Event could be just a page template)
Put fragments on it
Add a "list preview assetpublisher" to display the newest 3 event pages
Create a PDT (Page Display Template) to show the event preview as a card (with image or video)
Editor creates a new page. Adds or removes fragments.

Done.

Editor is happy. He has a WYSIWYG view. A nice url (SEO).
And when he need just for this specific event ..., he adds another fragment. To just this page.
thumbnail
Jorge Ferrer, modified 6 Years ago. Liferay Legend Posts: 2871 Join Date: 8/31/06 Recent Posts
Hey Christoph,

Thanks one again for the suggestion.

This is definitely aligned with the direction we want to go towards. If I've understood correctly we would need two features:
  1. Ability to create a "type of page" dynamically similarly to how we can currently we support web content structures. Currently we have page templates, I wonder if they could be a foundation for this.
  2. Ability to list pages of a certain type. Pages are indeed assets so it shouldn't be difficult to support it (I don't recall right now why they are filtered out of Asset Publisher).
One challenge with this approach though is what happens when the business user decides that they want to display the event somewhere else with a different look and feel. With a web content it is a piece of cake, but with this approach it's not clear how this could be supported. One way would be to create a web content structure and one article per page automatically later one when it's really needed. Although that may change how the content is edited/managed from then on. We need to think it carefully.

​​​​​​​I'd love to hear further thoughts that you may have on the topic.
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
@1: Yes, that would be a possibility. One requirement for these pages is that some fragments must be there/must not be removed.
@2: Yes. List the pages and(!) access the fields of the page. Pages are indeed assets? Ha. I guess, I thought otherwise that because they are not in the search index.

@Challenge part:
Well, I don't think that a structure is needed. It would just require two things: A name for each fragment and to enforce that a few fragments can't be removed. Maybe the editors could move them around, but they shouldn't be able to delete them.

Since each fragment is named and each lfr-editable has an ID, the field can be found/accessed:

Field field = page.getField(fragmentName, editableId);

Two other useful methods would be:
List<Field> fields =  page.getEditableFields(editableId)
List<Field> fields = page.getFragmentFields(fragmentName)

Note: The developer can't set the fragmentName, since the fragment is added multiple times.
Note 2: The developer of the PDT would of course need to know the fragment names, but he currently also needs to know the structure field names.
Note 3: It should be possible to "know" the fragment name in the template, to use it e.g. as part of an id and a javascript selector.

<div id="${fragmentName}_something">


The whole thing could also be processed by acessing the xml, but looking at webcontent and the necessity to sometimes parse/write the xml, I'd rather not do that again. The xml probably should stay available, but it really should be discouraged to use it.
thumbnail
Jorge Ferrer, modified 6 Years ago. Liferay Legend Posts: 2871 Join Date: 8/31/06 Recent Posts
Hey Christoph,

I think we are making progress. I need to table this for now since it won't make it into 7.2 and then get back to it for 7.3 in a few months.

Would you mind creating a Feature Request with a summary and linking to this thread from it?
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
Sure! I never expected this to be in 7.2, I just wanted to mention the idea.

https://issues.liferay.com/browse/LPS-92711
Lee Jordan, modified 6 Years ago. Expert Posts: 449 Join Date: 5/26/15 Recent Posts
Great discussion.

Not speaking from my own perspective, but from a users perspective. Events = Calendar. I get that it's just an example but if a business user wanted to create events ... users unlike us don't think in the 4th dimension. Users don't think in such a complex manor and will do the most logical thing to them.

Couldn't we create our own page types? Like we can create document types? "Marketing Page", "Content Page", "Event Page", "Contact Page", "Document Archive Page", "Social Page" ... Then users add a "Content Page" and if they want an Event page they do that and the pages then automatically we've preconfigured them to use templates and so users don't even have to worry about templates.

KISS ... would be to have an event page template already there out of the box ... but sticking with KISS just allow calendar events to be extenisible with custom fileds and then use asset publisher to pull out events tagged with "xyz" instead of "show full content", "view in context" ... the option would be in asset publisher to "show on event display page".

I'd love to see calendar worked on. There's a thousand ways to paint the canvas.
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
We always found the Calender highly inadequate for Events. Business users use mostly Outlook and expect that the Calendar is syncroniced. Also, Events often need alot of text, there should be images or videos, ...

So we use Webcontent. We display the next view events in a list, we even have a small month overview(days of the month) at a customer where all days with relevant events are highlighted (and clickable, of course). It is not ideal, but we found it better than using Calendar.


The ability to create our own page types was actually part of the idea to have Marketing Pages and Contact Pages and ... I was just using events as an example. And I prefer a generic solution to a special solution just for events.