Adding page in Admin: Change default to blog & item

How do i set the default “Add page” to parent page “blog” and page template to “item”? I’m writing a blog and basically all i do is creating blog posts and it’s kind of annoying when i have to change that all the time manually.

BTW: I’m using the Admin plugin

Hi @endogen, you can set the default child page type for page, which should help you out a fair bit. In the page frontmatter of your Blog Markdown file, add the following:

child_type: item

The above assumes that the template for blog children are named “item”, you theme might use another template name.

I do not remember if this is an option for the blog parent page in Admin, if it is it’s likely under the “Advanced” tab when editing that page.

I do not remember if this is an option for the blog parent page in Admin, if it is it’s likely under the “Advanced” tab when editing that page.

It is! Thanks for the help :slight_smile: Now the first step is done. Any idea how to set the default parent page for Add Page to blog?

I have not found any way to change the default parent page except to modify the YAML for the Admin Panel plugin, but this change can be lost when updating the Admin😕

Here is an example where I changed all new pages to default to the sidebarpage template:

File: \user\plugins\admin\blueprints\admin\pages\new.yaml

    name:
  type: select
  classes: fancy
  label: PLUGIN_ADMIN.PAGE_FILE
  help: PLUGIN_ADMIN.PAGE_FILE_HELP
  data-options@: '\Grav\Plugin\AdminPlugin::pagesTypes'
  #data-default@: '\Grav\Plugin\Admin\Admin::getLastPageName'
  default: 'sidebarpage'
  validate:
    required: true

Really helpful! Thanks for sharing