Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Why can't I see my template in the Page Template dropdown within admin?

Started by Muut Archive 9 years ago · 1 replies · 504 views
9 years ago

I have created a base.html.twig inside the templates/partials/ dir, then a post.html.twiginside the templates/ dir.

This is the content of post.html.twig:

TWIG
{% extends 'partials/base.html.twig' %}

{% block content %}
  <article class="c-main-content  c-post">

    <header class="c-post__header">
      <a class="c-post__permalink" href="#"><time datetime="{{ page.date|date('c') }}">{{ page.date|date("d/m/Y") }}</time></a>
      <h1 class="c-post__title">{{ page.title }}</h1>
    </header>

    <div class="c-post__body">
      {{ page.content }}
    </div>

  </article>

{% endblock %} 

Can anyone shed any light on why this won't show in the admin area? All I see is Default, Error and External.

9 years ago

Never mind - the file was named post.twig.html rather than post.html.twig. 😒

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1323 9 years ago
Archive · by Muut Archive, 9 years ago
2 919 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2923 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago