<p>If there's only this one page, I'd probably also use a Global Set instead of a Single Section for this.</p>

<p>Add a Global Set with the handle <code>siteInfo</code> and add a Plain Text field <code>title</code> for your title to it, make sure to mark it as translatable. Then in your template access it via <code>{{ siteInfo.title }}</code>.</p>

<p>The good thing with this approach is that you can allow your client to edit the title (for all locales), without having her edit the template or the static translations file. And! You can later add other fields to it, e.g. for other site metadata (description, open graph, etc.) or to change the site's theme.</p>

CC BY-SA 3.0
2015-02-18T10:22:53.970Z
2015-02-18T10:22:53.970Z
carlcs
<p>I have a Blog where everything is on one template. The entries don't have an own url.</p>

<pre><code>{% for entry in craft.entries.section('blog') %}
    {# everything #}
{% endfor %}
</code></pre>

<p>Now I want to give this page a title.</p>

<p>I could create a <code>single</code> called Blog page to have a title and a url. But isn't that a bit much for just a title? I hate to have a <code>single</code> with almost no content in the control panel.
Could there be a better way to add a title to that page?</p>

<p>Globals?
Categories?
Something else?</p>

<p>How do you handle that?</p>

CC BY-SA 3.0
2015-02-18T09:59:47.140Z
If the template this is on is purely the blog page, could you not just do a simple static `<h1>Page title</h1>` above the loop?
Alec Ritson
CC BY-SA 3.0
2015-02-18T10:12:11.557Z
Yeah. But it would be nice if it's triggered trough the cms because it will be a multilanguage page.
KSPR
CC BY-SA 3.0
2015-02-18T10:14:40.183Z
Oh okay sure, have you seen this article? http://buildwithcraft.com/help/static-translations it shows you how to achieve translations with static content :)
Alec Ritson
<best-practice>
Best practice for adding a title to a channel overview page
# Best practice for adding a title to a channel overview page

(Asked by: username_0 on 2015-02-18)

I have a Blog where everything is on one template. The entries don't have an own url.
{% for entry in craft.entries.section('blog') %}
    {# everything #}
{% endfor %}

Now I want to give this page a title.
I could create a single called Blog page to have a title and a url. But isn't that a bit much for just a title? I hate to have a single with almost no content in the control panel.
Could there be a better way to add a title to that page?
Globals?
Categories?
Something else?
How do you handle that?

**Tags:** best-practice
> **Comments:**
> **username_1**: If the template this is on is purely the blog page, could you not just do a simple static `<h1>Page title</h1>` above the loop?  
> **username_0**: Yeah. But it would be nice if it's triggered trough the cms because it will be a multilanguage page.  
> **username_1**: Oh okay sure, have you seen this article? http://buildwithcraft.com/help/static-translations it shows you how to achieve translations with static content :)  

---

## 1 answers

### Answer by username_2 on 2015-02-18. Score: 2 | Accepted answer

If there's only this one page, I'd probably also use a Global Set instead of a Single Section for this.

Add a Global Set with the handle `siteInfo` and add a Plain Text field `title` for your title to it, make sure to mark it as translatable. Then in your template access it via `{{ siteInfo.title }}`.

The good thing with this approach is that you can allow your client to edit the title (for all locales), without having her edit the template or the static translations file. And! You can later add other fields to it, e.g. for other site metadata (description, open graph, etc.) or to change the site's theme.


---

