title: In Go templates, accessing parent/global pipeline within range
body: <p>Is it possible, within a <code>{{range pipeline}} T1 {{end}}</code> action in the <code>text/template</code> package to access the pipelines value prior to the range action, or the parent/global pipeline passed as an argument to Execute?</p>
  
  <p>Working example that shows what I try to do:</p>
  
  <pre><code>package main
  
  import (
      "os"
      "text/template"
  )
  
  // .Path won't be accessible, because dot will be changed to the Files element
  const page = `{{range .Files}}&lt;script src="{{html .Path}}/js/{{html .}}"&gt;&lt;/script&gt;{{end}}`
  
  type scriptFiles struct {
      Path string
      Files []string
  }
  
  func main() {
      t := template.New("page")
      t = template.Must(t.Parse(page))
  
      t.Execute(os.Stdout, &amp;scriptFiles{"/var/www", []string{"go.js", "lang.js"}})
  }
  </code></pre>
  
  <p><a href="http://play.golang.org/p/gO6w0o3FeP">play.golang.org</a></p>