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

Custom page creation modal in Admin

Started by Alexander Kim 8 years ago · 5 replies · 915 views
8 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

8 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?

8 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

8 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?

8 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 jean-louis67, 3 days ago
2 82 2 days ago
General · by Andy Miller, 7 days ago
0 146 7 days ago
General · by Veehem, 1 week ago
0 146 1 week ago
General · by milkboy, 1 week ago
0 140 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago