RE: Are really templates + versioning + staging not compatible?

Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
I am evalutating to choose Liferay to create a website for my company, but a colleague of mine told me that adopting page templates together with both web content and page versioning in a staged configuration is not possible, since a reset & propaget issue will arise and I will need to switch off page versioning to fix it (DXP 7.0). 

Did someone have a similar issue? If so, it would be impossible to adopt Liferay with a distributed newsroom.

Thank you
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
I asked to other people in the chat. It seems a great failure of Liferay. Hope they fix it soon. At the moment, I won't choose DXP, it is useless for a large company. I am really surprised of Gartner's magic quadrant report...
thumbnail
Fernando Fernandez, modified 6 Years ago. Expert Posts: 401 Join Date: 8/22/07 Recent Posts
Hi Giovanni,

​​​​​​​Life is full of great failures... and nice victories too. ;-)

Fortunately a "couple" of large companies do not agree with you.

You might be suprised and start agreeing also with Gartner,  if you spend a little bit more of your time studying how Liferay can help you, instead of focusing on a single unmet requirement.

HTH

Fernando
Amos Fong, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Hi Fernando.Thank you for your answer.  As far as I know, Liferay appears a great CMS, but you will agree with me that the requirement I talked about is not marginal if you need to implement Liferay in a large company, with a distributed newsroom.
​​​​​​​
A colleague of mine explained me that he already tried to use page templates together with both page and web content versioning in a remote staging implementation, but reset and propagate errors appear during the use of the pages that oblige you to switch off page versioning, so making impossible the standard page features (which affect page workflows and standard publication process), despite of what described in the official documentation.So, I would be grateful if you could help me to understand what are those cases in which companies managed to overcome that issue without affecting the core code, or where I can find clear explanations step by step to deploy Liferay  correctly with the mentioned requirements. Are there any critical steps to take into account in order to avoid those issues?Thank you fot your help
Regards
thumbnail
Olaf Kock, modified 6 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Giovanni Bianchi
Hi Fernando.Thank you for your answer.  As far as I know, Liferay appears a great CMS, but you will agree with me that the requirement I talked about is not marginal if you need to implement Liferay in a large company, with a distributed newsroom.
Welcome to the Liferay community. Let me shine a light on how this can also be seen: "the requirement I talked about" is "page templates together with both web content and page versioning in a staged configuration". Well, to me, that's not a requirement. That's a bunch of nouns that are used on Liferay's UI. And it's the solution that you came up with for your problem. It's an impressive list of combined features from someone who is currently evaluating Liferay - no offense. The concatenation of so many features, together with the conclusion "At the moment, I won't choose DXP, it is useless for a large company." in a first (and second) post in this community is dangerously close to trolling.

All we know about the underlying problem is "distributed newsroom" - I can think about a multitude of directions where to take this, but you give no clue what this should be.

Had you described your underlying problem, the solution might be completely different. It might require creative use of the APIs, maybe a bit of custom implementation (something that large companies that you bring forward typically don't fear). It might have a solution in a configurable combination of existing features. E.g. it might be possible, simply. But we have no clue what you're looking for.
​​​​​​​
Giovanni Bianchi
...
So, I would be grateful if you could help me to understand what are those cases in which companies managed to overcome that issue without affecting the core code, or where I can find clear explanations step by step to deploy Liferay  correctly with the mentioned requirements. Are there any critical steps to take into account in order to avoid those issues?
As you mention "large companies" and  "Liferay DXP" (and large companies typically want to have support): Your best option might be to get in contact with Liferay Sales in your region. There's knowledgeable staff that will be able to help you find a solution once they understand your problem. And yes, it might involve a bit of custom code. It might also point to an issue that will be fixed once it's known. Maybe this is just a combination that hasn't been tried out before, or you're on a version that had a bug in this regards (you didn't mention the version you're using)

Of course, you can also describe the problem here. But your mentioning "large company" might mean that you're looking for something more firm than random forum comments.
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Olaf Kock
Giovanni Bianchi
Hi Fernando.Thank you for your answer.  As far as I know, Liferay appears a great CMS, but you will agree with me that the requirement I talked about is not marginal if you need to implement Liferay in a large company, with a distributed newsroom.
Welcome to the Liferay community. Let me shine a light on how this can also be seen: "the requirement I talked about" is "page templates together with both web content and page versioning in a staged configuration". Well, to me, that's not a requirement. That's a bunch of nouns that are used on Liferay's UI. And it's the solution that you came up with for your problem. It's an impressive list of combined features from someone who is currently evaluating Liferay - no offense. The concatenation of so many features, together with the conclusion "At the moment, I won't choose DXP, it is useless for a large company." in a first (and second) post in this community is dangerously close to trolling.

All we know about the underlying problem is "distributed newsroom" - I can think about a multitude of directions where to take this, but you give no clue what this should be.

Had you described your underlying problem, the solution might be completely different. It might require creative use of the APIs, maybe a bit of custom implementation (something that large companies that you bring forward typically don't fear). It might have a solution in a configurable combination of existing features. E.g. it might be possible, simply. But we have no clue what you're looking for.
​​​​​​​
Giovanni Bianchi
...
So, I would be grateful if you could help me to understand what are those cases in which companies managed to overcome that issue without affecting the core code, or where I can find clear explanations step by step to deploy Liferay  correctly with the mentioned requirements. Are there any critical steps to take into account in order to avoid those issues?
As you mention "large companies" and  "Liferay DXP" (and large companies typically want to have support): Your best option might be to get in contact with Liferay Sales in your region. There's knowledgeable staff that will be able to help you find a solution once they understand your problem. And yes, it might involve a bit of custom code. It might also point to an issue that will be fixed once it's known. Maybe this is just a combination that hasn't been tried out before, or you're on a version that had a bug in this regards (you didn't mention the version you're using)

Of course, you can also describe the problem here. But your mentioning "large company" might mean that you're looking for something more firm than random forum comments.
Hi Olaf.

Thank you for your replay. You're right, I should clarify better what the requirement was, and why I mentioned page templates + versioning + staging. 
I was thinking to a distibuted newsroom (about 20 people), formed by not technical people accontable for their specific website section, who should produce and input contents very easily, with little knowledge of the CMS. Moreover, some of them will not be able to publish directly, but through a single approver workflow.
For this reason, page templates are a smart way to make contribution (and above all modification) of pages easy for those who do not have a deep knowledge of Liferay and its components: they have just to fill in a form, instead of drag and drop contents or applications and configure them.

Beyond those pages designed by using page templates, I am sure that a series of pages wiil need to be designed with no templates in order to guarantee maximum flexibility. In this case, page versioning enables page workflows and allows to restore previous contents if editors make some errors or their versions are not approved.
In addition, since an important requirement is that the newsroom should be able to work on some pages, contents, or whole sections and preview them before going online, (remote) staging is also needed to guarantee that the frontend does not change during these activities.

All these features that enables and meets these requirements seem to be available in Liferay documentation or YT official tutorials, but my concern is that all together are not possible and I should accept some customisations that affect the core code, so making upgrades more difficult or loosing some important standard features.  

Grateful if you can help me to understand if Liferay can meet these requirements.
​​​​​​​Thank you
Regards
​​​​​​​p.s. I was referreing to DXP 7.0
thumbnail
Andrew Jardine, modified 6 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
Hi Giovanni,

I have a question -- or a question/clarification I guess. You mentioned that this is a new desk so I assume that creating articles is the principal content that your team of content authors will be writing. The page templates you are referencing, is that because you plan (or believe that you need) to have a page for each article?
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
Could you explain what you are trying to achieve?

Maybe there are other ways to resolve your usecase without using e.g. page templates. We practically don't use them, since I never found them very useful in the beginning. Our editors usually just copy an existing page instead of creating one from a page template. The propagation feature is rather clumsy and not very flexible. When we needed to change "all pages", we usually either clicked through them or wrote a script to change them.
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Christoph RabelCould you explain what you are trying to achieve?

Maybe there are other ways to resolve your usecase without using e.g. page templates. We practically don't use them, since I never found them very useful in the beginning. Our editors usually just copy an existing page instead of creating one from a page template. The propagation feature is rather clumsy and not very flexible. When we needed to change "all pages", we usually either clicked through them or wrote a script to change them.
Hello Cristoph.

Actually I did not provide clear info about the main requirements, so I explained them more in the detail in reply to Olaf (please see above). Even if I do not want to use page templates everywhere, in many cases they would be very useful in order to allow not so technical people belonging to the distributed newsroom to create and edit their contents with little knowledge of the CMS, without dragging and dropping contents and application (and configuring them), but simply filling in a page template.
I understand that copying pages is another possible solution: there be some "model" pages that can be used as a reference, you're right. But will they need to  copy and then move them to the appropriate folder? If so, it will make the process slower than using page templates.
In any case, If I avoid page template, can Liferay DXP meet the requirements? Can page versioning and remote staging be implemented without page templates? 

Thank you
Regards
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
I see.

I have never heard about that constraint, that page templates don't work with staging. Could be, I just don't know. We use page templates very seldom and never had staging problems (well, related to page templates, we had others).

I think, your idea to use page templates makes a lot of sense.

But just to explain: You add a page and select "Copy" as page type instead of <your template>. Then you select "Copy", you want to copy. So, it is a drop down box extra when creating a page. This works reasonably well in our usecase. I remember, I had some issues with page templates a long time ago, since they are created globally and I had some configuration problems because I needed to configure the portlets for the current site.

Anyway. Just try it, maybe this is a reasonable workaround.
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Christoph RabelI see.

I have never heard about that constraint, that page templates don't work with staging. Could be, I just don't know. We use page templates very seldom and never had staging problems (well, related to page templates, we had others).

I think, your idea to use page templates makes a lot of sense.

But just to explain: You add a page and select "Copy" as page type instead of <your template>. Then you select "Copy", you want to copy. So, it is a drop down box extra when creating a page. This works reasonably well in our usecase. I remember, I had some issues with page templates a long time ago, since they are created globally and I had some configuration problems because I needed to configure the portlets for the current site.

Anyway. Just try it, maybe this is a reasonable workaround.
Thank you Christoph. I will try as you suggested. I hope it will not be difficult to update copied pages when they are formed by several types of contents and application in sequence.

Thanks
​​​​​​​Regards
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Christoph, another missing possibility of using copies of pages instead of page templates is that if you need to add some contents (e.g. an adv banner) to a series of pages based on a page template, you can do it simply updating the page template. Otherwise, you will have to edit manually all those pages manually. If they are hundreds pages, the effort is huge!
​​​​​​​Regards
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Hello.

I have tried to implement your suggestion, it is a smart way to have a pre-compiled page, so that another page can be used as model for a new page. But afterwards you need to substitute each web content or configure application in the page with all news ones. A page template could help to speed up this process, but if it cannot be used together with versioning ans staging at the same time, I understand that yours is the only solution.

I only wonder if a fix for this issue is planned for next releases of Liferay. It is a pity not to fully exploit the power of this CMS. In any case,  IMHO clarifications about this issue should be included in the official documentation.

Thank you
thumbnail
Andrew Jardine, modified 6 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
Hi Giovanni,

If I am understanding you correctly (which is why I asked above a separate question) -- it sounds to me like you want to have these "templates" so that you can have a distinct page for every article in the news site. The reason it sounds like this to me is because of your statement --
 so that another page can be used as model for a new page. But afterwards you need to substitute each web content or configure application in the page with all news ones
Or am I misunderstanding what you are saying? 

If I am now, then I think it's worth pointing out that, in Liferay, that is not really how pages are intended to work. If what you are looking for is a "templated page" where the content is dynamic (read: same "template" but different article every time) then I think the concept you are looking for in Liferay is referred to as Display Pages: https://dev.liferay.com/en/discover/portal/-/knowledge_base/7-1/creating-display-pages

Is that it? or have I missed what you are trying to accomplish?
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Andrew JardineHi Giovanni,

If I am understanding you correctly (which is why I asked above a separate question) -- it sounds to me like you want to have these "templates" so that you can have a distinct page for every article in the news site. The reason it sounds like this to me is because of your statement --
 so that another page can be used as model for a new page. But afterwards you need to substitute each web content or configure application in the page with all news ones
Or am I misunderstanding what you are saying? 

If I am now, then I think it's worth pointing out that, in Liferay, that is not really how pages are intended to work. If what you are looking for is a "templated page" where the content is dynamic (read: same "template" but different article every time) then I think the concept you are looking for in Liferay is referred to as Display Pages: https://dev.liferay.com/en/discover/portal/-/knowledge_base/7-1/creating-display-pages

Is that it? or have I missed what you are trying to accomplish?

Hello Andrew. I am sorry I did not answer to your comment above before.

Actually I was not thinking to those pages for dynamic contents like news, but for a product catalogue. There will be two types of pages for which I though to adopt page templates: the first one is for presenting a family of products, for which I am thinking to design each page with a series of web contents to introduce the family and, below, the list of all products of that family (by including an asset publisher). For this kind of page, using a page template is convenient because the configuration of the asset publisher is simpler. And, if I need to change the structure or layout of those pages, I can directly act on the page template ad propagate it to all those pages. Otherwise, I will need to edit them one by one.

The second one is for the product pages. I understand that these ones can be also created like articles, and presented by a display page. But, in this case, will I be free to customise a single product page deviating from the display page layout? I mean, all products will not have the same complexity: some are more complex and need more contents like videos, pictures, a list of technical data, and other dynamic elements. Will a display page allow this kind of flexibility? If so, when page templates are really fundamental and cannot be subsituted by a display page?
Thank you
thumbnail
Andrew Jardine, modified 6 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
Hi Giovanni,

Actually I was not thinking to those pages for dynamic contents like news, but for a product catalogue. There will be two types of pages for which I though to adopt page templates: the first one is for presenting a family of products, for which I am thinking to design each page with a series of web contents to introduce the family and, below, the list of all products of that family (by including an asset publisher). For this kind of page, using a page template is convenient because the configuration of the asset publisher is simpler. And, if I need to change the structure or layout of those pages, I can directly act on the page template ad propagate it to all those pages. Otherwise, I will need to edit them one by one.

If you have a few designs yo can share to illustrate this requirement, it might help drive the conversation. When I read this I immediately thought of the use of a Vocabulary (called Products) and then categories under it to represent each individual product. Liferay has, out of the box, a portlet called Category Navigation. The best part about this is that the portlet is an Application Display Template (ADT) enabled portlet which means you can use the logic for retrieving the categories for one of more vocabularies and then create your own custom template to render the results. The template, under the hood, is a DDMTemplate, same as you have with a WCM. They can be as simple as just markup with variables for placeholders for where you want to inject the text, or they can be complicated with JS logic and service lookups etc. This to me sounds like it might be the best option for creating a hierarchy .. and if you need a WCM for each product you can set the category on the WCM and then look up the assets that are stamped with that category. From the assets you can get the WCM entries and using Liferays API you can retrieve the markup for that entry using whichever WCM template you want. The beauty is that using something like this for an approach leaverages feature that Liferay gives you and that they support. Read: no real customization. It's also all runtime configuration management from template definitions to creatin the content items.

The second one is for the product pages. I understand that these ones can be also created like articles, and presented by a display page. But, in this case, will I be free to customise a single product page deviating from the display page layout? I mean, all products will not have the same complexity: some are more complex and need more contents like videos, pictures, a list of technical data, and other dynamic elements. Will a display page allow this kind of flexibility? If so, when page templates are really fundamental and cannot be subsituted by a display page?
If I understand you correctly, then you should still be able to achieve this with a single display page. Ideally your Product (Structure) is a superset of all your different views. When the content admin creates a new (product) item, they fill in the fields that are applicable. So in the case of a Video its x,y,z but for a pictures it's a,b,z etc. What you are describing, from what I understand, is the idea that different products will render differently -- but that is where I love Liferay's WCM. You can create a Video Product Template, a Article Product Template, a Summary Video Template etc and in each of them you craft the view using whatever markup you want and choosing the WCM fields you need. With this approach, the single display page is still valid -- you have a layout applied of 70/30, your content renders (based on the template) in the left hand column, your adds and promos and whatever render in the right. The right hand rail is configured as part of the display page so you don't need to worry about it. If you need the content there to be reactive based on the article on the left, then you can use portlets that Liferay provides (like the Asset Publisher) or custom plugins you write to leverage public render parameters like tags and category ids so that they choose their content dynamically as well.

There are lots of options. Page templates are definitely a good resource, though I personally have not had occasion to use them often -- and I still maintain that I am unsure it would be the right choice for you anyway. Again, if you have a visual you could share, that'd really help emoticon

..
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Hi Andrew.
Thank you a lot, you were very clear and helpful!

I understood what you said and I will talk to that my colleague in order to understand why he insisted on using page templates, since very likely we could avoid them and, therefore, all those limitations that generated that incompatibility with page versioning and staging.

Just to give you more info about the product pages, I have not designed them yet but the idea is to have that flexibility that you can see comparing some product pages on Amazon's website, for example https://www.amazon.it/gp/product/B01M03MJRQ and https://www.amazon.it/gp/product/B07D8DPBDJ : they have a similar common structure, but they include some other different static or dynamic contents depending on the type of product (for example, a tracklist in the second one).

Thank you again!!
Regards
thumbnail
Andrew Jardine, modified 6 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
Hi Giovanni,
I understood what you said and I will talk to that my colleague in order to understand why he insisted on using page templates, since very likely we could avoid them and, therefore, all those limitations that generated that incompatibility with page versioning and staging
It could be just a case that he is not very familiar with Liferay himself. Liferay is a huge product with so much more than just content managment. In fact I often have to laugh a little under my breath when I hear people comparing it to tools like word press or drupal... or even Adobe Experience manager. Truthully, when I hear these things, it just confirms for me how little the speaker knows about the product emoticon. But, being such a big product means that there are often several ways to solve the same problem and it often takes quite a bit of experience to understand the subtleties that will help decide which of the several options is the BEST approach in a given case. A lot of it just comes from practice and experience and I think, as developers, we tend to gravitate towards the things we already know which often means trying to force something to do that it was not intended for. 

Just to give you more info about the product pages, I have not designed them yet but the idea is to have that flexibility that you can see comparing some product pages on Amazon's website, for example https://www.amazon.it/gp/product/B01M03MJRQ and https://www.amazon.it/gp/product/B07D8DPBDJ : they have a similar common structure, but they include some other different static or dynamic contents depending on the type of product (for example, a tracklist in the second one).
Hmm -- I see. Well, there are a couple of ways to handle this emoticon. I think the right answer would start by understanding how many products you currently have and how much they vary from one to another. I have no experience adding products in Amazon so I am not sure how they handle this scenario but I know on some other commerce platforms they use a generic "product attribute" list as the way to hadle these sort of variations. So could do something similar by creating a "product attribute" field on your structure and then marking it as repeatable so that you can add as few or as many as you need. But then you would have to introduce into your template(s) the logic to detect and handle them. I think the main challenge in this case is that your structure is no longer "structured" in that you won't necessaarily know FOR SURE that you have this field or that one. 

An alternative might be to have a "Product" structure that contains the fields that are common to all products. So things like a title, description, price, image. Then for each of your concrete product types you can create a new structure for that product type that has a parent structure of "Product". This means that for you "Phone" product you would then add the 6 or whatever fields that you need to describe the phone, where are for the ablum you could create a repeatable field called track. Each product could then use it's own WCM template allowing you to render them completely differently but still leverage the same display page to show them all when the user clicks on an item. 

The one thing I mentioned above is important though. The approach you take should take into consideration how many products you have now and also if your catalog will grow, then by how much and how would the pattern you choose look in the future. You don't want one strucutre with a million field options that are all optional, but you also don't want to have 100 structures to choose from when creating content. In truth, I feel, there is a real art to this part of the process and finding the balance can be hard. One thing I like to do is create a matrix with my products across the top and the attributes as rows. I think fill in the matrix to see how much overlap there is between the items. I then use another colour to predict growth and again try to assume the overlaps. At that point you will have a sense of what it would look like and you can strat to decide how you can chunk out your products. My guess is that you will likely end up with a parent structure and then buckets where largely overlapping products are grouped together under a single structure that has a mix of required and optional fields. So for example ..

Product
    |
    |---- Electronics
    |---- Clothing
    ...

because all clothing have size, colour, etc. So shirts, pants, shorts, sweaters, it makes sense to house them as a single concrete Product type, and then provide multiple templates or logic in the templates to handle the optional fields.

Hopefully this explanation hasn't been too theoretical?
..
Giovanni Bianchi, modified 6 Years ago. New Member Posts: 11 Join Date: 4/12/19 Recent Posts
Hello Andrew
​​​​​​​
Thank you again, you were very clear. The catalogue will have about 600 products, but will not increase any further so fast. There will be not so many variants for each product, and the methodology you explained is very effective. I will follow the steps you listed.
It will be likely that just for some few products, I will need to add some very specific contents and in specific positions (think to videos, or adv banners), but I think I will be able to manage them by using generic html fields or by making possbile the embedding of other external web contents.

Thanks again!