Comments on Nunjucks 101 All Comments Start of Thread Parent

Ah that would be because you need to declare the macros first! I only provided the code for one of these macros, as I was more just showing how it makes things more readable rather than providing nunjucks macros to use (though I might release some nunjucks snippets at some point!), but you can try out the tabButton macro I gave like so:Zq-E56-BKJ4-F.png

I'm glad to hear it was helpful for you, though, and I wish you luck with your website :)

Ah weird, the tab snippet gives me a render error on my end, saying stat isn't defined. I wonder if it's a browser/settings issue or something, as one of the scripts failed to load according to the inspector (also lots of font-awesome errors lmao); it explains why nothing I tried worked my first time around attempting this. Here I thought I was just completely confused on how macros worked. 🤣 

firefox_zbuPa21bwX.png

Ah that's because I didnt provide the stats macro! Only the button example has all the parts to be tested I'm afraid, if I get chance though I'll recreate these macros again so they can be played with :)

EDIT: OH and the font awesome one I have fixed but forgot to push to the live version of the site as I'm currently working on a new layout let me go fix that ty for the reminder <3