Goca Posted December 7, 2021 Posted December 7, 2021 Hi there, I am creating a blog system, and I currently have a setup where I have blog-home, blog-year, blog-section, and blog-post as templates. I have created a blog-drafts template, which is where blog-post templates will be created, and then I have the following hook that has some basic logic to check for an appropriate blog-year and blog-section page group to set as the post parent (such as 2021/12): // Blog Post handler to place blog post into appropriate blog section based on date $this->addHookBefore('Pages::published(template=blog-post)', function(HookEvent $event) { $pages = $event->object; $page = $event->arguments(0); $bh = wire('modules')->getModule('BlogHelper'); $bh->postByDate($page); }); All of this is working perfectly, however there's 1 step that's lacking to really streamline the whole process, and that's the first "Add Page" step that simply requires "Title" and "Name." Starting from creating a new page via the "Add New" dropdown using a Bookmark: Then being presented with the following screen: And finally editing additional page fields after initial page creation: Is there any way to cut out the second step and just set all page details right away? I would love to be able to streamline this for our blog editor so that he can just click "Add New -> Blog Post ..." and then set all details for the post from there. Thanks!
bernhard Posted December 8, 2021 Posted December 8, 2021 Sure: https://processwire.com/blog/posts/processwire-2.5-changelog/#adding-pages 1
Goca Posted December 8, 2021 Author Posted December 8, 2021 Wow, that was way easier than I expected. I must have been typing the wrong search terms in, and still new to ProcessWire so reading through documentation as I go along, but wasn't sure how to find this in particular. Thank you for the help! ? 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now