Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 25, 20178 yr There are cases when I want to add a block in a template using template logic, but it does nothing. For instance, when I have the condition (below) in a block and insert the block in the index template there's no input. However, when I add the condition directly into the index template it works. {{if in_array($category->id, array(1))}} my_content_here {{endif}} Sure I can add the same code in a custom template, but I'll have to create a custom template for every theme I use. I rather make a block into the templates so when I modify that block all of the templates get updated. Or is it already possible using blocks?
January 26, 20178 yr Yeah, it's rather annoying the number of places you have to edit the same code on many, many pages.
Archived
This topic is now archived and is closed to further replies.