Created
April 22, 2012 20:18
-
-
Save jacine/2466618 to your computer and use it in GitHub Desktop.
Options?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% helperclasses on %} | |
<!-- Simple example (default) --> | |
{% if items %} | |
<{{ type }}{{ items.attributes }}> | |
{% for item in items %} | |
<li{{ item.attributes }}> {{- item -}} </li> | |
{% endfor %} | |
</{{ type }}> | |
{% endif %} | |
<!-- More granular example --> | |
{% if items %} | |
<{{ type }}{{ items.attributes }}> | |
{% for item in items %} | |
{% if item.attributes.href %} | |
<li><a href="{{ item.attributes.href }}"> {{ item.title }} </a></li> | |
{% else %} | |
<li>{{- item -}}</li> | |
{% endif %} | |
{% endfor %} | |
</{{ type }}> | |
{% endif %} |
Hey @AmyStephen!
I think it's actually item.attributes.title, and item.attributes.href now. Not sure though. I was just trying to demonstrate the top part, which is actually going to be like this: {% helperclasses on %} I believe. This would be a toggle setting for adding first/last/even/odd classes.
I'll update it when I figure it out. :)
BTW, trying to solve this uglyness (more recent example) without making designers go into preprocess functions: http://pastebin.com/peftf8gz :P
Looks fantastic, @jacine. You are doing great work. Love watching you lead. =)
OMG. lol. If you pull this off, you will never have to buy beer at a Drupalcon again.
LOL! That would be awesome. :D
I updated it to what I think it's gonna be. ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should line 12 be item.title ?