Answers.Body: <p>We would need to know how you render your title. Otherwise it would just be </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;{% if title is defined %}{{ title }} {% endif %}{{ siteName }}&lt;/title&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>and in your <code>category</code> template</p>
  
  <pre><code>{% set title = 'Category ' ~ category.title %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-14T19:07:35.793Z
Answers.LastActivityDate: 2017-11-14T19:07:35.793Z
Answers.UserDisplayName: Robin Schambach
Body: <p>I am trying to get the page title of the categories page. Currently it shows as: <code>category-name</code>, but I would like to have it set to <code>Category Name</code> to match the <code>category.title</code>.
  My <code>categories/index.html</code> looks like this:</p>
  
  <pre><code>{% set title = category %}
  
  {% block content %}
  
      {% set entries = craft.entries.relatedTo(category) %}
  
      {% for entry in entries %}
  
          -- Code Here --
  
      {% endfor %}
  
  {% endblock %}
  </code></pre>
  
  <p>Thanks in advance.</p>
  
Tags: <templating><categories><category><titles>
Title: Setting the page title for a category page
ThreadText: # Setting the page title for a category page
  
  (Asked by: username_0 on 2017-11-14)
  
  I am trying to get the page title of the categories page. Currently it shows as: `category-name`, but I would like to have it set to `Category Name` to match the `category.title`.
  My `categories/index.html` looks like this:
  
  ```
  {% set title = category %}
  
  {% block content %}
  
      {% set entries = craft.entries.relatedTo(category) %}
  
      {% for entry in entries %}
  
          -- Code Here --
  
      {% endfor %}
  
  {% endblock %}
  
  ```
  
  Thanks in advance.
  
  **Tags:** templating, categories, category, titles
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-14. Score: 3 | Accepted answer
  
  We would need to know how you render your title. Otherwise it would just be
  
  ```
  <!DOCTYPE html>
  <html xmlns="http://www.w3.org/1999/xhtml" >
  <head>
      <meta charset="utf-8" />
      <title>{% if title is defined %}{{ title }} {% endif %}{{ siteName }}</title>
  </head>
  
  ```
  
  and in your `category` template
  
  ```
  {% set title = 'Category ' ~ category.title %}
  
  ```
  
  
  ---
  
  