Unfortunately no. So right now i'm going with the bad solution of having two identical copies of the same code, which i have to remeber to update in both places if i make changes, with the only difference being the referenced BlockList or BlockGrid in the top of the file.
Unifying BlockListItem and BlockGridItem
Hi,
Is there any way to "unify" the view file rendering for BlockListItems and BlockGridItems?
It seems weird that you have to create two completely identical view files for rendering a block through a BlockList or a BlockGrid?
The only difference in the view file is the inherits line:
vs.
Is there any way that i can use the same rendering template so that the block can be used both in a Block List and a Block Grid?
Did you ever find a solution for this ?
Unfortunately no. So right now i'm going with the bad solution of having two identical copies of the same code, which i have to remeber to update in both places if i make changes, with the only difference being the referenced BlockList or BlockGrid in the top of the file.
Hi Kåre,
This works for me: Gist: Unifying partial between BlockGridItem and BlockListItem
is working on a reply...