Jump to content

Two custom blocks: vertical and horizontal


Sonya*
Go to solution Solved by Marc Stridgen,

Recommended Posts

I have created a new block based of Feed from Articles with Default Template

Then I have added the block two times on the page. One in the vertical and another in the horizontal position.

As the result, both the blocks use horizontal view for display:

screenshot-2021_12.20-07_25_07.thumb.png.b4bc558ae798f9d1cbd2ab0c74741eb7.png

If I use only one block on the page, I see the correct view. But if the same block is placed into both the positions, they both start to use the same view (horizontal).

How to bypass it?

Link to comment
Share on other sites

I see. We already have two orientations in the template:

{{if !empty( $records ) }}
	<h3 class='ipsWidget_title ipsType_reset'>{$title}</h3>
	{{if $orientation == 'vertical'}}
		<div class='ipsPad_half ipsWidget_inner'>
			this is a vertical view
		</div>
	{{else}}
		<div class='ipsWidget_inner'>
			this is a horizontal view
		</div>
	{{endif}}
{{endif}}

But the orientation is ignored (because of caching?). It is weird to have two blocks to handle different views, while we already handle the orientation views in the block template itself...

I would say, it is a bug, where orientation of the block is not saved in cache. 

Edited by Sonya*
Link to comment
Share on other sites

It is even worse 😞 We cannot use the same block in horizontal AND vertical position even on different pages. If it is cached as vertical first, it will be displayed as vertical throughout the entire Suite. The actual position is ignored. If it is cached as horizontal, then it will be displayed as horizontal.

It looks like having the same block in vertical and horizontal position is not possible. Not on the same page, neither on different pages.

Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...