Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Custom page creation modal in Admin

Started by Alexander Kim 9 years ago · 5 replies · 1155 views
9 years ago

Template selection via custom page creation modal is selected with the name.
So if you want to use the sometemplate.html.twig template you would have to use

YAML
name:
  type: hidden
  default: 'sometemplate'

For adding taxonomy, this is instead done on the page blueprint itself, not on the creation modal, you can add a default attribute with your tag.

hope it helps

9 years ago

@paul:
name:
type: hidden
default: 'sometemplate'

I've tried this and it didn't work for me. You just provide path to template like mainpage.html.twig or you give full path?

@paul:
For adding taxonomy, this is instead done on the page blueprint itself, not on the creation modal, you can add a default attribute with your tag.

If i do this in a blueprint, then all news would have the same category, i want to set custom default category when using this custom page creation modal, is this possible?

9 years ago

no, you just use the template name, without the .html.twig extension example:
mytemplate.html.twig -> mytemplate
blog-article.html.twig -> blog-article

If i do this in a blueprint, then all news would have the same category, i want to set custom default category when using this custom page creation modal, is this possible?

It is not possible afaik

9 years ago

@paul:
no, you just use the template name, without the .html.twig extension example:

mytemplate.html.twig -> mytemplate

blog-article.html.twig -> blog-article

I've used twig extension ... 🙂 That's why it didn't work, ty. If i do not mention default template what it will be using?

@paul:
It is not possible afaik

Page creation modal functionality is very limited as i understand? It's just a modal to create a page? Can't set custom field values using it? Only in a page blueprint?

9 years ago

Page creation modal functionality is very limited as i understand? It’s just a modal to create a page? Can’t set custom field values using it? Only in a page blueprint?

Yes, at least for now

👍 1

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago