So I've created a small subtheme called bartik_graphql
. It just overrides the 'Powered by Drupal' block. Besides it's bartik_graphql.info.yml
file it has a templates
directory containing one file block--bartik-graphql-powered.html.twig
.
Contents of block--bartik-graphql-powered.html.twig
:
{#graphql
query {
admin:userById(id: "1") {
name
}
}
#}
{% extends "@bartik/block" %}
{% block content %}
<div{{ content_attributes.addClass('content') }}>
{{ content }} and some guy named {{ graphql.data.admin.name }}
</div>
{% endblock %}
I've enabled my subtheme and set it to default. However I receive the following error:
Twig\Error\LoaderError: Template "@bartik/block" is not defined. in Twig\Loader\ChainLoader->getCacheKey() (line 122 of web/core/themes/bartik/templates/page.html.twig).
What I expect to happen is have my subtheme's template override what is used by default to display the 'Powered by Drupal' message.
Drupal: 8.7.8
PHP: 7.2.17
Am I using extends wrong here?