I’m trying to basically do:
{{ range .Site.Menus.social }}
{{ if .Url }}
<a href="{{ .Url }}" target="_blank">{{ .Pre }}</a>
{{ end }}
{{ if eq .Identifier "rss" }}
<a href="{{ .RSSLink }}" target="_blank">{{ .Pre }} </a>
{{ end }}
{{ end }}
I want to look for “rss” to come up and use .RSSLink … rather than simply always showing it in this list. That way I can have the config specify a menu item that only has an identifier and whatever HTML (in this case a Font Awesome icon) for “rss” and show the default, but also allow someone to instead specify a URL for another RSS feed (maybe its through feedburner or a different feed or something) and simply not identify it as “rss” and have it show in the menu/list here. – Or not show it at all.
However, this code doesn’t work. Printing out .Identifier on the page shows I set “rss” just fine (didn’t misspell anything, etc.) but trying to test for it doesn’t work.
Ideas? Thanks!