Thank you for continuing to try to assist me.
The code I’m trying to change is directly out of Gogs. In fact, I’m actually modifying this file: https://github.com/gogits/gogs/blob/master/templates/base/head.tmpl
Once again, I’m modifying this for internal use, not to add to the open source project that is Gogs.
So here is some code that will iterate through the Organizations that belong to the User:
{{range .ContextUser.Orgs}}{{.Name}}{{end}}
Imagine that the user has 2+ of these Organizations. What I’m simply trying to do is display the Name of the first (ie. Index = 0) Organization. I find it hard to believe that a lengthy function has to be created to do this. Surely there must be a way to do this directly within the braces?
Robert