Message Boards

Liferay 7.2 Edit Blog Entry Html

Alessandro Mari, modified 3 Years ago.

Liferay 7.2 Edit Blog Entry Html

New Member Posts: 11 Join Date: 10/23/20 Recent Posts


I have Lifeary 7.2

I found the way to edit the template of List of Blogs Entries but i don't find the way to edit the html or template of a single entry.

How can i do that?

thumbnail
Olaf Kock, modified 3 Years ago.

RE: Liferay 7.2 Edit Blog Entry Html

Liferay Legend Posts: 6396 Join Date: 9/23/08 Recent Posts

Looking at the Widget Templates that are available in global scope, it seems that an individual blog entry is not templated. Thus, I'd expect the markup to be created in a JSP in the blog portlet.

Unless I've missed something, your options are, in order of my personal preferences:

  • Add some specific CSS to your theme to modify appearance of a blog article
  • Add some additional markup and/or JS to the page, e.g. from a PortletFilter, that modifies either the appearance or the DOM to what you like
  • Change the markup generated by the blogs portlet from a Portlet filter (buffer the output, modify it, then deliver the modified version)
  • Override the JSP that generates the output

and, well, CSS changes in your theme can be applied to all the other solutions as well.

Alessandro Mari, modified 3 Years ago.

RE: Liferay 7.2 Edit Blog Entry Html

New Member Posts: 11 Join Date: 10/23/20 Recent Posts

I have to edit html.

Filters can allow to edit a string.

I think to override the JSP  file because i have a better control to the DOM.

 

Thank you