Answers.Body: <p>So it looks like you're using the old syntax for SEOmatic 1.x for Craft 2.x; here's how you do the same thing in SEOmatic for Craft 3:</p>
  
  <pre><code>{% do seomatic.meta.seoTitle("Some Title") %}
  </code></pre>
  
  <p>c.f.: <a href="https://github.com/nystudio107/craft-seomatic#twig-templating" rel="nofollow noreferrer">https://github.com/nystudio107/craft-seomatic#twig-templating</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-15T14:15:04.797Z
Answers.Text: sorry about that I was using the old syntax
Answers.UserDisplayName: Jeroen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-28T13:15:03.107Z
Answers.Text: actually this doesn't work for a 404.twig in the templates folder
Answers.UserDisplayName: Jeroen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-28T17:37:58.500Z
Answers.Text: Are you sure? I'm setting it that way here: https://nystudio107.com/404
Answers.UserDisplayName: andrew.welch
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-12T10:07:07.323Z
Answers.Text: Looks like the title is only updating after save some Seomatic settings page.
Answers.UserDisplayName: Jeroen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-20T15:14:23.013Z
Answers.Text: @Jeroen Saving a settings page clears the caches. So it sounds like you're making Twig templating changes in an environment with `devMode` off, or you're not clearly caches on deploy.
Answers.UserDisplayName: andrew.welch
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T12:41:35.780Z
Answers.Text: Hi @andrew.welch I know this is an old question but it appears there is something still strange going on with a 404 page title. In the instance of a 404, seomatic.meta.seoTitle can end up with a value even though entry is not defined and its not been manually set.
  
  You can see it here is different to your 404 page example: https://nystudio107.com/404test
Answers.UserDisplayName: Jay
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-15T13:15:12.847Z
Answers.LastActivityDate: 2018-08-15T13:15:12.847Z
Answers.UserDisplayName: andrew.welch
Body: <p>404 page doesn't have a title. It shows "| Sitename" in my case.</p>
  
  <p>I'm using Craft 3 with the <a href="https://github.com/nystudio107/seomatic" rel="nofollow noreferrer">SEOmatic</a> plugin and would like to set the title in the 404 template.</p>
  
  <pre><code>{% set seomaticMeta = seomaticMeta | merge({ seoTitle: '404 page not found' }) %}
  </code></pre>
  
  <p>This gives a internal server error, looks like the seomaticMeta object is not available on the 404 page.</p>
  
Tags: <craft3><plugin-seomatic><404-page>
Title: 404 page title SEOmatic
ThreadText: # 404 page title SEOmatic
  
  (Asked by: username_0 on 2018-08-15)
  
  404 page doesn't have a title. It shows "| Sitename" in my case.
  
  I'm using Craft 3 with the [SEOmatic](https://github.com/nystudio107/seomatic) plugin and would like to set the title in the 404 template.
  
  ```
  {% set seomaticMeta = seomaticMeta | merge({ seoTitle: '404 page not found' }) %}
  
  ```
  
  This gives a internal server error, looks like the seomaticMeta object is not available on the 404 page.
  
  **Tags:** craft3, plugin-seomatic, 404-page
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-08-15. Score: 3 | Accepted answer
  
  So it looks like you're using the old syntax for SEOmatic 1.x for Craft 2.x; here's how you do the same thing in SEOmatic for Craft 3:
  
  ```
  {% do seomatic.meta.seoTitle("Some Title") %}
  
  ```
  
  c.f.: <https://github.com/nystudio107/craft-seomatic#twig-templating>
  
  > **Comments:**
  > **username_0**: sorry about that I was using the old syntax  
  > **username_0**: actually this doesn't work for a 404.twig in the templates folder  
  > **username_1**: Are you sure? I'm setting it that way here: https://nystudio107.com/404  
  > **username_0**: Looks like the title is only updating after save some Seomatic settings page.  
  > **username_1**: @username_0 Saving a settings page clears the caches. So it sounds like you're making Twig templating changes in an environment with `devMode` off, or you're not clearly caches on deploy.  
  > **username_2**: Hi @username_1 I know this is an old question but it appears there is something still strange going on with a 404 page title. In the instance of a 404, seomatic.meta.seoTitle can end up with a value even though entry is not defined and its not been manually set.  You can see it here is different to your 404 page example: https://nystudio107.com/404test  
  
  ---
  
  