Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

81 Excellent

About Orkun

  • Rank
    Sr. Member
  • Birthday 10/10/1996

Profile Information

  • Gender
  • Location

Recent Profile Visitors

4,577 profile views
  1. Am I right, that when I attempt to change the default value of a Select Options Fieldtype, that it will only change the Field Value (or better said the displaying of the selected Radio on the Page Editor) of Pages that were created back in the days but were never saved afterwards? Every Page that was saved back in the days with the old default value will remain as it is now am I right?
  2. @kongondo I know that the page will be cloned to the right parent. But what I am trying to achieve is, that the cloned item should appear in the pagetable table itself (see screenshot). There is no real connection between the pagetable field and the pagetable item.
  3. @kongondo The Form is rendered by the ProcessPageClone Module, this is natively and I haven't created the form or the logic behind it. It was already there.
  4. @kongondo My idea was to add a Hook to renderTable() where I use str_replace() to replace this part of the return string: <td><a class="InputfieldPageTableDelete" href="#"><i class="fa fa-trash-o"></i></a></td> with: <td><a class="InputfieldPageTableDelete" href="#"><i class="fa fa-trash-o"></i></a></td> <td><a target="_blank" class="InputfieldPageTableCopy" href="/processwire/page/clone/?id=xxxx"><i class="fa fa-clone"></i></a></td> And then also add a little bit of JS to replace the "xxxx" part with the right Item/Page ID by looping through the items. I would get the ID from the parent HTML tag (<tr>) where it is placed as a data attribute: <tr data-id="2133"> <td> <a class="InputfieldPageTableEdit" data-url="/processwire/page/edit/?id=2133&modal=1&context=PageTable" href="#"> <i class="fa fa-edit"></i> </a> </td> <td><a class="InputfieldPageTableEdit" data-url="/processwire/page/edit/?id=2133&modal=1&context=PageTable" href="#">News</a></td> <td>News Teaser</td> <td> <a class="InputfieldPageTableDelete" href="#"><i class="fa fa-trash-o"></i></a> </td> </tr> When I would click on one of these "new" clone urls it would open up a new window with the rendered clone form where you can submit it to clone the corresponding page. But this way the new cloned page won't be added to the pagetable. KR Orkun
  5. Hi @kongondo Sorry but I don't quite understand for what I should need the parent_id when I would clone the items pages with /processwire/page/clone/?id=xxxx Shouldn't the url above already clone the corresponding page in the right place? What I meant is, when I would clone such a page it wont be added to the pagetable table here (see screenshot) and that is what I am trying to achieve. KR Orkun
  6. Hi @kongondo Thanks for your answer! I have also another Question. If I have set a specific parent page (where the pagetable items are stored) for the pagetable field. This means the items aren't saved as children of the page where the pagetable field lives. How do I need to setup the clone URL, so that it also gets automatically added into the pagetable table, is that even possible? I mean the normal clone url would look like this: ..../processwire/page/?action=clone&id=xxxx But that would just clone the page without the connection to the pagetable field am I right? KR Orkun
  7. Hi @ryan Can't the title be skipped inside the CSV when the defined parent page has the childNameFormat set? KR Orkun
  8. Hi Guys How can I achieve, that editors can clone pagetable content items? For example displaying some kind of icon/link right after the trash icon inside the pagetable table to clone the respective content item/page. As far as I know the method where the trash icon gets added is not hookable. What would you do? KR Orkun
  9. Hi @kongondo I am using this field also inside the lister. But when I add it as a Filter it only shows me this search operators: I taught it would be handled like a normal textfield where "contains text/phrase" would be also supported? KR Orkun
  10. Hi Guys I am trying to output a warning message in the admin to the user if he unpublishes a page which has children pages. This is the code I have inside my autoload sitehelper module. $this->addHookBefore('Pages::unpublishReady', $this, 'notifyOnUnpublish'); public function notifyOnUnpublish(HookEvent $event) { $pages = $event->object; $page = $event->arguments(0); if($page->numChildren > 0) { $this->warning("You have unpublished a page which contains sub-pages. You need to move these sub-pages or unpublished them."); } } It works when I am on Page Edit Screen. But how can I make something like this work for the Pagetree Actions with ajax refreshing? KR Orkun
  11. I have a find statement where I am doing sort=doctors_last_name The field is a multi-language text field. It is not required. The doctors should be ordered alphabetically. The problem is now, that the field is sometimes empty in the default language and because of that the doctors with the empty lastname get prepended to the beginning. Sorting in memory is not an option, since I am using pagination and there are also over 2000 Doctors. How does the sort in selector exactly work? Does it look first in the current language and then as a fallback to the default language? KR Orkun
  12. Ok i solved it, by moving the hook into init.php under /site/.
  13. I have a pagetable field called "partner_create_events" where partners should be able to create new Events. Now at the moment there are already Events from last year. I tried to hide these Event Pages inside the admin table view with a hook. But somehow when you add a new pagetable item it doesn't execute the hook and I don't know why. I tought it would work, since InputfieldPageTableAjax.php is calling the render() Method inside renderAjax(). Can you help please? My code is inside ready.php under /site/. $wire->addHookBefore("InputfieldPageTable::render", function(HookEvent $event) { $obj = $event->object; if($obj->name == 'partner_create_events') { $pagearray = $obj->value; $newpagearray = wire('pages')->find("id=$pagearray, select_year.id=2"); $obj->value = $newpagearray; } }); KR Orkun
  14. Hi Guys How can I adjust the view links inside the dropdown? I could only manage to adjust the normal view link with a hook to ProcessPageEdit::buildFormView. KR Orkun
  • Create New...