# Getting title for an alternate output format

**URL:** https://discourse.gohugo.io/t/getting-title-for-an-alternate-output-format/18542
**Category:** support
**Created:** [May 6, 2019, 5:34pm UTC](https://discourse.gohugo.io/t/getting-title-for-an-alternate-output-format/18542 "2019-05-06T17:34:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![larsks](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/larsks/32/8554_2.png) [@larsks](https://discourse.gohugo.io/u/larsks)
#### Post date: [May 6, 2019, 5:34pm UTC](https://discourse.gohugo.io/t/getting-title-for-an-alternate-output-format/18542/1 "2019-05-06T17:34:36Z")

</div>

I would like the RSS feed links on my site to include a title. I tried adding a feed link like this:

```
    {{ with .OutputFormats.Get "RSS" }}                                     
    <link href="{{ .RelPermalink }}"                                        
          rel="alternate"                                                   
          type="{{ .MediaType.Type }}"                                      
          title="{{ .Title }}">                                             
    {{ end }}                                                               

```

This fails with several errors along the lines of:

> ERROR 2019/05/06 13:30:49 render of “section” failed: execute of template failed: template: post/list.html:1:3: executing “post/list.html” at \<partial “header.html” .\>: error calling partial: “/…/themes/ghostwriter/layouts/partials/header.html:30:24”: execute of template failed: template: partials/header.html:30:24: executing “partials/header.html” at \<.Title\>: can’t evaluate field Title in type \*page.OutputFormat

I thought maybe this was just a question of `.Title` being unset in some contest, so I tried this instead:

```auto
          title="{{ .Title | default "" }}">                                             

```

…but that resulted in the same errors. How do I get the page title into this link?

---

<div class="post-metadata">

### Author: ![regis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/regis/32/4958_2.png) [@regis](https://discourse.gohugo.io/u/regis)
#### Post date: [May 6, 2019, 5:52pm UTC](https://discourse.gohugo.io/t/getting-title-for-an-alternate-output-format/18542/2 "2019-05-06T17:52:46Z")

</div>

Hey there,

An Output Formats retrieve with `.OutputFormats.Get` is an Output Format, `.Title` is available on pages, not on Output Format.

If your page is the root context of your template file then try `$.Title` instead.

---

<div class="post-metadata">

### Author: ![larsks](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/larsks/32/8554_2.png) [@larsks](https://discourse.gohugo.io/u/larsks)
#### Post date: [May 6, 2019, 6:08pm UTC](https://discourse.gohugo.io/t/getting-title-for-an-alternate-output-format/18542/3 "2019-05-06T18:08:55Z")

</div>

Thanks, `$.Title` worked!
