Forum
custom content repeated twice using blocks
I'm using Blocks and custom content to retrieve data from a particular page and blocked region. As per your help on this question: https://forum.grabaperch.com/forum/10-08-2015-custom-content-using-blocks
The custom content is now being retrieved/displayed on another page using a specified template. When it renders the output on the page it does so twice?
I've tried count = 1
This didn't happen on my local MAMP setup but did on the live server. Thomas on my previous thread above has experienced the same thing if you see his comments.
Local server setup:
Perch: 2.8.14, PHP: 5.5.3, MySQL: 5.5.33, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.14), assets (2.8.14), categories (2.8.14), perch_forms (1.8.3)
Live Server setup:
Perch: 2.8.14, PHP: 5.3.3, MySQL: 5.1.73, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.14), assets (2.8.14), categories (2.8.14), perch_forms (1.8.3)
Can you show me the code you're using?
Product page where the brand logos are added:
Brand logos block template: (content/blocks/brand_logos_block.html)
Homepage with custom content wanting to load brand logos from products page:
Homepage custom content template (blocks/brand_logos_blocks.html) which has the required perch:blocks tag pair:
This all displays correctly, meaning a list of brand logos when on my local MAMP setup. But on the live server it loads the set of brand logos twice:
Simplified version of the Local mamp website output:
Simplified version of the Live website output:
Note the live version repeats the block twice?
Any ideas?
Can you confirm it's still happening in the current version?
Upgraded to 2.8.15 and resaved the regions and still the same. Thomas experienced the same problem, see his comments here:
https://forum.grabaperch.com/forum/10-08-2015-custom-content-using-blocks
Ok, thanks, we'll have another attempt at reproducing it.
It looks like you have multiple
<perch:blocks>
section in your template, along with content in the<perch:before>
section.I can't get the behaviour to occur with a valid template.