Forums de discussion

Liferay 7 - Customizing pagination markup

Juan José Fuentes, modifié il y a 6 années.

Liferay 7 - Customizing pagination markup

New Member Publications: 7 Date d'inscription: 28/01/16 Publications récentes
I need to modify the HTML markup for the default paginator in Liferay 7, so all paginators have the same specific markup (need some old style simple links instead of the dropdown that appears by deafault).

I've been investigating the ui taglibs, the markupView attribute for most of them... That in the end it's harcoded to "lexicon" in almost all of the instances.

If you were to do that, what would be the best approach? I was thinking on creating a fragment module and modify the two start.jsp files (one is the default, other for "lexicon"). What I'd really love to is to use another markupView value, but as this "lexicon" is harcoded in the jsp files, I don't think I can do that... Any ideas?
thumbnail
Andrew Jardine, modifié il y a 6 années.

RE: Liferay 7 - Customizing pagination markup

Liferay Legend Publications: 2416 Date d'inscription: 22/12/10 Publications récentes
Hi Juan,

That in the end it's harcoded to "lexicon" in almost all of the instances.


It's not really a "hardcoding". The idea is that lexicon is used for the styling and that you would provide whatever styles you need through your own implementation/definitions using lexicon. It's a new concept, and one that I am still trying to get my head around but there are some resources out there. One of them -- https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/importing-lexicon-css-into-a-theme

.. and I haven't tried it yet, but I have on my list to try out this tool -- https://github.com/Robert-Frampton/lexicon-customizer. I saw it in action last year at the LRNAS conference an I think it would/will make your life a lot easier.

I would only use fragments and manipulating all the JSPs with custom code as a last resort. For starters it will add complexity to your upgrade path. Outside of that, I think it's considered the "old way" of doing things and tools like Lexicon we brought to us to avoid using those techniques.