Greatest hits from previous weeks:
|
How do I filter a list of entries by the value of a field? For example, if I have a lightswitch field called “Featured”, how do I output just the featured entries?
|
I’m essentially looking for a way to have a template that runs through a bunch of sets that I might use throughout my templates. The problem is, if I include in a template with an extends, it dies up …
|
I have a field in a matrix block that is used for video embed codes. I want to output the contents of that field directly as HTML. However, it always seems to get entity-encoded (ie. the < and > …
|
After going through the documentation I believe that this is the correct code to output the url for the asset field but its not working and I have no idea why. Please help! {% nav program in craft….
|
Is there a way to check what environment craft is running on – ie, dev or not dev – via the template. For example: {%if env is ‘dev’%} hello dev {% else %} hello world {% endif %}
|
I would like to select the second position in the array below. The problem is that this number is automatically changed. So I try to do this with .index function from Twig but I can not figure it out. …
|
Is it possible to output the template name being used? Using a global variable or something similar? I am wanting to check which template is being used in a conditional.
|