Search the Community
Showing results for tags 'field values'.
-
Hi! I have many pages-childrens of my main page with name=rates and i want to get all the childrens of my rates page by their input field value. My input field is checkbox and i want to get the page if checkbox is checked. Any help?
-
New to Hooks, trying to wrap my head around the syntax
creativejay posted a topic in Getting Started
I really wanted to create this post with some sample code to show that I at least tried to figure it out on my own first, but I'm really struggling with how hooks are even written. I know it's a very simple context for anyone who's already using them (and hopefully it will be for me, soon), but this is my first time. What I'm trying to achieve in this attempt is to verify/change the name and title fields of a page, of one specific template with one specific field, whenever the page is saved. Initially, I am using the Family / Name Format for Children to skip the name/title/confirm save page when an author creates a new page in my site using kongondo's ProcessBlog module. In English, I want to: Detect when a page of template blog_page is saved with the blog_categories field value of Swatch, and replace the title and name string with a concatenated version of the following fields (from the same page): blog_date, createdUser, blog_brand and blog_name. From what I've read so far, I should build this hook into site/templates/admin.php, and I should use the saveReady() and maybe saveField() hooks. Other than knowing I need to define a custom hook, I really haven't got any idea of where to go from here. Here's my mangled first attempt at coding my hook. Hopefully you'll be able to tell how I might be misunderstanding this from the following: $pages->addHookAfter('saveReady', $this, 'myPageRename); public function myPageRename($event) { } I'm afraid that's really as far as I've gotten because I have no idea what I'm doing. I try to follow examples but they feel really far removed from context for me. Thanks for any light that can be shed on this!