Skip to content

Instantly share code, notes, and snippets.

@clivewalker
Last active November 1, 2018 12:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clivewalker/757b87f04e31138ce9d91d7a2a7926e9 to your computer and use it in GitHub Desktop.
Save clivewalker/757b87f04e31138ce9d91d7a2a7926e9 to your computer and use it in GitHub Desktop.
With Perch CMS, you can use conditional tags with the different attribute to compare _block_type. Credit: Hussein Al Hammad. Original question by Jay George: "Any idea if it's possible to change the output of a block depending on which block procedes it? e.g. if a 'heading' block is followed by another 'heading' block, the output is changed?"
<perch:if different="_block_type">
This is a different block type
</perch:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment