Views output appears as one column only.

CommentFileSizeAuthor
#3 example-class-names.jpg6.59 KBtanc

Comments

cmwelding created an issue. See original summary.

dom.’s picture

Please, tell me more

tanc’s picture

StatusFileSize
new6.59 KB

I'm also seeing this issue using a custom theme. In the views admin the masonry javascript targets the rows correctly but when viewing on the front end it displays as a single column.

I think its due to the custom theme using stable as its parent whereas the admin theme is using classy as its parent. Masonry appears to expect certain class names to target the javascript.

For example:
Shows $container value (class names)

So I think the solution for a themer is to add the desired classes to the correct template. I will try this next and report back.

tanc’s picture

I can confirm this is the issue. To resolve I copied views-view.html.twig from core/themes/classy/templates/views to the templates directory in my custom theme.

Ideally the module wouldn't rely on specific classes provided by classy theme. Maybe a preprocess hook to add specific classes which can then be relied upon might be a solution?

tanc’s picture

Status: Active » Closed (duplicate)