HTML5 tags in templates ?


I'm customizing my theme to create my website in NB. I used HTML5 (new) tags such as <section>, <aside>, etc... in the "featured content slider" loop ({% for feature in page.features %})... 

NationBuilder is closing every "unknown" tags (these new HTML5 tags), I guess NB doesn't support HTML5? If so, that's a big feature missing :/

Also, I wonder if there is a great documentation about EVERY template tags. For the featured slider, I just can find help in the "Page variables" in the administration (which describes feature and feature.count). In fact, I'm looking for the current position in the loop to display a number in my slider pagination. Any idea ?

Thanks for the help!

Official response from completed

These variables are available in a for loop, you can use {{ forloop.index }} to get the position in the loop.

forloop.length => length of the entire for loop
forloop.index  => index of the current iteration 
forloop.index0 => index of the current iteration (zero based) 
forloop.rindex  => how many items are still left?
forloop.rindex0 => how many items are still left? (zero based)
forloop.first => is this the first iteration?
forloop.last  => is this the last iternation? 

We will look into what's up with HTML5 tags, I know we are using them on already, so at least some of them work.

Showing 6 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.