6 years ago
Topic

Hi

Can we make a position override in the masonry template?

I tried without success. 

I wrote a file in \templates\seb_masonry\positions\mylist\list\item.php but it is not taken into account

thanks


cyril

Get a VIP membership
4229 Posts
Kadministrator
6 years ago
7
Level 1

You can't override list template.

If you wish to override item inside list, you need to override item template (so in short, place your override in minima or whatever you are using for item). You need sth like templates\seb_minima\positions\SOMELIST\item\mainbody.php

6 years ago
6
Level 2

Hi Klas

thanks but MAsonery doesn't have a item tab, everything is done on the list !

thanks

cyril

4229 Posts
Kadministrator
6 years ago
5
Level 3

Any list template has item tab, you just need to set the right mode in the list template configuration (Style->Display>Advanced(Item view)

6 years ago
4
Level 4

yes klas but masonery doesn't work if you activate the item view :) the masonery effect is lost then

4229 Posts
Kadministrator
6 years ago
3
Level 5

It works fine, item is shown inside each - masonry controlled - box. Difference between normal list  and item mode is just that you have more control over what is shown inside each list item in the item view.

Here you can see masonry demo in item view https://demo.seblod.com/seblod-templates/masonry/advanced

6 years ago
2
Level 6

Hi Klas

Ok it's TECHNICALLY working with the item mode but we loose the masonry effect (such as pinterest) . The whole interest of Masonry is to gather images of different sizes and ratios 

The layout on https://demo.seblod.com/seblod-templates/masonry/advanced could be done with any other template.


thanks


cyril

4229 Posts
Kadministrator
6 years ago
0
Level 7

As I wrote - masonry deals with boxes (how they are arranged on a page). List or item choice only affects what is inside those boxes so there is no way it would break masonry by itself.

There must something in your markup/styling that you need to change, e.g. if you have set all items to be 100% width or something similar it would change the appearance.

1283 Posts
Bucklash
6 years ago
0
Level 7

This is true, isn’t it:

Masonry requires a ‘dummy’ div as first list item that all other list items base there size on

If you make custom template based on minima template  to feature that div and have a template setting that allows you to add class etc to that div then that would be good solution. Not telling you how to suck eggs, but if want overrides then that is probably only way. 

6 years ago
0
Level 1

Hello Klas,

Thank you for your answer, it is actually the css corresponding to the override that broke the display of the MASONRY list.
To make an override of a Seblod list which has like template "Masonry" works very well.

As you said it is also necessary to adjust the parameters of the list to "Advanced (Item view)" and then to override the Item view:
templates \ seb_minima \ positions \ somelist \ item \ mainbody.php

It works perfectly!
Thank you

Agathe.

Get a VIP membership