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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Custom Page Creation Modal

Solved by flavio View solution

Started by Theo M Jones 9 years ago · 1 replies · 1025 views
9 years ago

I'm following the solution for creating a custom add post modal here: Custom Page Creation Modal

I'm following this down to a tee and it doesn't seem to add the option in the bar at the top.
I must be overlooking something here.

My user/blueprints/admin/pages/new_post.yaml
I'm literally copying and pasting directly from the the documentation. I have a file named posts in my pages directory which stores all my current posts.

YAML
form:
  validation: loose
  fields:
  section:
    type: section
    title: Add Post
  title:
  type: text
  label: Post Title
  validate:
    required: true

folder:
  type: hidden
  default: '@slugify-title'

route:
  type: hidden
  default: /posts

name:
  type: hidden
  default: 'post'

visible:
  type: hidden
  default: ''

blueprint:
  type: blueprint

In the user/config/plugins/admin.yaml

YAML
add_modals:
   -
     label: Add Post
     blueprint: admin/pages/new_post
     show_in: bar

I've triple checked my file paths and still no luck.

9 years ago Solution

The feature is documented in Learn but only available in the 1.5.0 release, which is currently an RC (https://github.com/getgrav/grav-plugin-admin/releases)

You can enable it by turning on the GPM Testing releases in the Grav System configuration.

I'm sorry for this confusion, I added an alert on top now:

<img src="//cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex036/uploads/getgrav/original/1X/2ef625ad292995c9b0ed6e7523d0cec2dc9ebc65.png" width="690" height="197">

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 50 6 hours ago
Support · by Anna, 2 days ago
2 58 9 hours ago
Support · by Justin Young, 10 hours ago
1 28 10 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 53 5 days ago