Instantly share code, notes, and snippets.
As an experiment I tested to see if I could use perch:related in a block to enhance an article but include related content in the body of the article. The experiment was a success. Here is a simple example of what I did
First create a template that references the collection you would like to related, naturally using the perch:related
The template could look sometime like this.
Then in the page where you want to insert the block you would add
So far, I've tested it successfully linking multiple collections each with its own template and each referenced with its own block in the main page template.
Of course, this being Perch, the markup can be customized to fit your design, but I was happy to see that it worked. It opens up many creative possiblities