P
Parrick
Newcomer
First Post
Conversation Starter
5 posts
I have a blue print at the following location:
user/themes/klar/blueprints/modular/about-us-me.de.yml
And the page is here:
user/pages/03.home/_ueber-uns/about-us-me.de.md
Template here:
user/themes/klar/templates/modular/about-us-me.html.twig
Content of blueprint:
t itle : G allery
f orm :
f ields :
t abs :
t ype : t abs
a ctive : 1
f ields :
g allery :
t ype : t ab
t itle : G allery
f ields :
h eader.an_example_text_field :
t ype : t ext
l abel : A dd a number
d efault : 5
v alidate :
r equired : true
t ype : i nt
Content of page:
-- -
t itle : ' Über uns '
m edia_order : a gentur.jpg
t est : t est
-- -
# Webagentur
The tab is not showing up, i cleared also the cache.
Is the langauge code the issue?
Thank you so much for your help!
last edited 07/08/20 by pamtbaau
P
pamtbaau
Grav Forum Moderators
Legend
First Post
Conversation Starter
Well Liked
3129 posts
@patrick20, Welcome to the forum. Hope you will be going to enjoy Grav!
There are a few issues with the setup.
You are not using the default English language, but German. Therefor you will have to define the supported languages in '/user/config/system.yaml'
l anguages :
s upported : [ d e ] # Add others if needed
Blueprints do not use the language ('de') as extension. All language use the same page blueprint. Only the content of the blueprint is translated.
f ields :
g allery :
t ype : t ab
t itle : T HEME_KLAR.GALLERY // this will be translated
With the following in '/user/config/themes/klar/languages.yaml':
e n :
T HEME_KLAR :
G ALLERY : G allery
d e :
T HEME_KLAR :
G ALLERY : G alerie
You will probably want to extend the default configuration in your page blueprint for 'about-us-me.yaml'. You should therefor tell Grav that it extends the default page:
title: Gallery
'@extends': default
last edited 07/08/20 by pamtbaau
P
Parrick
Newcomer
First Post
Conversation Starter
5 posts
Thanks for your answer!
This alone wasn't enough to solve this issue.
This is the system config regarding the languages:
l anguages :
s upported :
- d e
d efault_lang : d e
i nclude_default_lang : true
p ages_fallback_only : false
t ranslations : true
t ranslations_fallback : true
s ession_store_active : false
h ttp_accept_language : true
o verride_locale : true
default has be a blueprint?
last edited 07/08/20 by Parrick
P
pamtbaau
Grav Forum Moderators
Legend
First Post
Conversation Starter
Well Liked
3129 posts
@patrick20, The blueprint 'default' to extend from is already defined by Grav in '/system/blueprints/pages/default.yaml'
The suggestion from @arkhi to replace 'yml' with 'yaml' does indeed make a difference...
It seems you are not the first to stumble on it. Here is an issue on the repo about Load .yml files as well as .yaml
last edited 07/08/20 by pamtbaau