Quantcast
Channel: {{ if }} branches end up in different context
Browsing all 9 articles
Browse latest View live

{{ if }} branches end up in different context

What is wrong with that ? {{ range site.Home.Section.RegularPages }} <li> <a href=“{{ .RelPermalink }}” {{ if eq $.Page . }}aria-current=page{{end}}> {{- partial “docs/title-menu” . -}}...

View Article


{{ if }} branches end up in different context

Did you try including the attribute in quotes? Read full topic

View Article


{{ if }} branches end up in different context

You tell me ! I don’t see quotes around aria-current=page. Read full topic

View Article

{{ if }} branches end up in different context

Nor do I. That’s why I asked if you tried a more traditional approach, namely quoting the attribute value. Read full topic

View Article

{{ if }} branches end up in different context

Ah, I didn’t get your question… When I try, the message changes. {{ range site.Home.Section.RegularPages }} <li> <a href="{{ .RelPermalink }}" {{ if eq $.Page ....

View Article


{{ if }} branches end up in different context

Probably another line since there’s no reference to Pages in what you posted. Read full topic

View Article

{{ if }} branches end up in different context

The line is precisely {{ range site.Home.Section.RegularPages }} Read full topic

View Article

{{ if }} branches end up in different context

Check out the docs. Section is not what you think it is. And the error message tells you exactly that. Read full topic

View Article


{{ if }} branches end up in different context

Oh yes, Returns the name I ended up importing my old config I am familiar with, and used site.GetPage "docs". As the saying goes, if ain’t broke don’t fix it. Read full topic

View Article

Browsing all 9 articles
Browse latest View live