Jump to content

Search the Community

Showing results for tags 'page save'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 4 results

  1. Hi i need some help to solve this. I need to save a specific value when saving a page $p = $pages->get('template=customer_project'); $p->location = "Hello world"; $page->save($p); This is my code right now in ready.php. location is my field "text field" inside template "customer_project". Right now when i refresh a page with the template it only populates one page? I want every page that has this field "location" to say Hello world and save it to the database? Don´t know if a hook is better.. PLEASE HELP!!!
  2. Hello, in a 2.6.22rc1 install I have a page field "workshops" that selects pages via selector "template=workshop,sort=-dat_start,dat_start>=today)". The field is in a template "anmeldungen". When I edit a page with template "anmeldungen". I can choose pages from the page field "workshops". But when I want to save that page, I get an error Page 2188 is not valid for workshop (Page 2188 does not match findPagesSelector: template=workshop,sort=-dat_start,dat_start>=today) But the workshop I am trying to save to the page field is definitely in the date range >=today. Otherwise it wouldn't be listed in the page field select dropdown. The same error is thrown when I change my selector to "template=workshop,sort=-dat_start,dat_start>=2015-11-04". Also saving pages through the API to that field doesn't work. Only if I omit the dat_start>= selector, I can save pages to the page field.
  3. The Processwire version is ProcessWire 2.4.0 © 2015 When attempting to save edits to the page, instead of getting the pw success message, I get the 404 page not found page. This page in question cannot be deleted, moved, edited...nada. Page edit takes me to: http://www.mydomain....e/edit/?id=5772 When I attempt to save the edits the address bar still says: http://www.mydomain....e/edit/?id=5772 but it displays the 404 Page Not Found page and changes are not saved. Also disabled Modsecurity on the server. Any ideas please
  4. 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!
×
×
  • Create New...