Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

torf's Achievements

Jr. Member

Jr. Member (3/6)



  1. Thanks, but what permission is it? If I knew I could just give this permission to my userrole, but only superuser seems to get the "choose parent" page. And I cannot give superuser rights to my users.
  2. I have a strange behaviour that I cannot fully understand. In my page there are child pages who themselves have subpages. Home Child 1 Child 2 Sub 2.1 Child 3 Sub 3.1 Sub 3.2 A couple of my roles have the right to add new subpages to any of the childpages. Works great if I use the treen navigation and "new" beside one Child. But if I use the "add new" button on the right, or the "add new" link from dropdown in the header, only the superuser is shown a page to choose the parent before adding the subpage. For any other user it directly creates a subpage in one of the children. Does anyone know which right is needed to get the selector for other roles than superuser?
  3. Thanks for this wonderful and extremely helpful module, but I was wondering if there is a possibility to assign more than one role to a user with this module? I have 4 roles with basically the same rights but access to different branches of my site (access is granted by role). Now if I give a user more than one of this roles Admin Restrict Branch gives them access to only the first branch but not the other ones. I'm aware that it is not possible to have multiple branches in one role, but is it somehow possible to mix branches with multiple roles for one user?
  4. Thanks. Yes I've read this one and I already use it. But the SU has the right to empty the Trash completely, while any non superuser has to go the whole way edit->delete->confirm for every single page in trash. What I try to achieve is making this button available for users below superuser.
  5. Maybe I'm missing a point here, but I could not get my users to empty the trash. In my site I've got a Couple of user roles with limited rights for different parts of my page. Above them all there is one role with access to the whole page, users and form entries but not superuser (due to the nature of my clients I do not want them to fiddle around with forms or modules). So some users have the right to delete pages, but cannot access the trash, while the "master role" is supposed to empty it from time to time. What rights do I need for this role to empty the trash without opening every page manually? Or is the "empty trash" button strictly for superusers?
  6. I have a page that has frontend and backend users. So frontend users register themself via the old Login/Register module and get assigned a special guest role, while backend users are made by the site-admin in backend. My problem is that frontend users have a lot of required fields (from name, phone number and address up to specific company information), while backend only need login, email, password and their role. If I mark all those extra fields as required, the site admin would have to fill them out in the backend as well when adding a new user. Is there any hook for adding the required status of those extra fields only in the frontend? Or seperate frontend and backend users in another way?
  7. I was trying to set up a workflow so a specific role receives an email when another role marks a page as "ready for publishing" via checkbox. Seems like this module does exactly that, but it's listed as not compatible with PW3.0. Has anybody tried it already or knows if it works?
  8. Thanks a lot - both of you. It works, and again I am a bit nearer to understanding how processwire works.
  9. Hi, I really got Stuck on a quite common Task, but cannot find the problem. The Idea was to have a checkbox in my backend, and set another integer field to 0 upon save if this checkbox is not checked. So I added the following code to my ready.php $wire->addHookBefore('Pages::saved', function($event){ $page = $event->arguments(0); if($page->hasField("my_checkbox")) { if($page->my_checkbox == 0) { $page->another_integer_field = 0; $this->message("This should have worked"); //for debugging only } } }); Everything works great, the debugging message shows up, but the value in "another__integer_field" does not change. Can anybody tell me where my mistake is?
  10. I see. Thanks for the clarification @Robin S I use a German backend translation and it seems the filter for showing only valid options does not show up in German... Sadly the selector is a bit more complicated in reality. Pages are chosen based on a value in another page selector field they hold. So the original selection is $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == "choose_page") { $page = $event->arguments(0); $zv = $page->parent->title; $event->return = $event->pages->find("template=my_Template, field_in_my_Template=$zv"); } }); I do not think that can be achieved without php.
  11. Oh. I didn't know this one. I just tried $wire->addHookAfter('InputfieldPageAutocomple::findPagesSelector', function($event) { if($event->object->hasField == "choose_page") { $event->return = $event->pages->find("template=template_name_to_choose_from"); } }); but to no avail. I still get every page returned. Or maybe I have misunderstood how to use it. What puzzles me is that it works perfectly with Dropdwon or Select. How is Autocomplete different?
  12. Hi everybody, I tried to make only special pages accessible through a page reference field, but got a strange problem. In my ready.php I added $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == "choose_page") { $event->return = $event->pages->find("template=template_name_to_choose_from"); } }); But I keep getting all pages of my site back when I use autocomplete for my field. With select or radio it works as expected. Can anybody tell me why?
  13. basename($child->template->filename) does the job of course, thanks. But I still do not understand how the function in Processwire is used. The reference is not very clear.
  14. For onpager navigation I'm trying to get the name of all template php files so I can include them based on their status (hidden/shown). But I cannot get the names without the path. So foreach($page->children() as $child) { echo $child->template->filename()."<br/>"; } gives me the whole path for each file. In https://processwire.com/api/ref/template/filename/# it is stated, that the argument $filename can omit the path, but without examples I'm to dumb to find out how to use it... PS: of course I could strip it with vanilla php, but if there is already a function for that I'd rather use it.
  15. Is there any workaround by now? I need to have my backend set to German as default (as the person using the page does not speak English), and cannot get the datefield to save a date.
  • Create New...