abmcr

Members
  • Content count

    31
  • Joined

  • Last visited

Community Reputation

3 Neutral

About abmcr

  • Rank
    Jr. Member

Recent Profile Visitors

3,648 profile views
  1. There is a way for change the label "Children" (see attachment) only for a template? In the hook https://processwire.com/api/hooks/captain-hook/ i have not found a hook for made this.... The idea is $pages->addHook??????('?????', function($event) { $page = $event->arguments[0]; if($page->template->name == 'my-template') { //rename the label children Thank you
  2. May be another problem: i have a ckeditor into a repeater and the drag and drop into the editor don't work; in the same repeater there is an images fileds.
  3. Your code work fine! Thank you $matches = $pages->find("testo|pagina_blocco.testo~=$q");
  4. I have a field named"testo" (textarea) included in various templates (home, page, post) ; in one of these the template (post) the field "testo" is an input of a repeater field named "pagina_blocco". If a search a word this selector //$q is the search word $matches = $pages->find("testo~=$q"); the selector get the text only if the "testo" field is not included in the repeater, ie only in the home and page template but not if the word is in the field when this is included into the repeater. I have try with a simple SQL directly on db SELECT * FROM `field_testo` WHERE `data` LIKE '%ente%' and this query find 2 rows: but only the row corresponding to a page The 2 pages founded by query And the corresponding templates: the id 61 is a repeater But in the search page only the pages_id=1 is showed by the selector. If i edit the selector in $matches = $pages->find("testo~=$q,template=home|repeater_pagina_blocco14") the search find also the second row , but in the matches result the ID of page in witch the repeater are included is not present..... How it is possible to search into a field included in a repeater? Obvious it is possible with a series of query from the db.. but this is not PW style Thank you
  5. Hello. I have the same problem: i want to require a filed into a repeater.... an hook?... do you may put a simple approach? I have try with this not working code into ready.php $wire->addHookAfter('FieldtypeRepeater::savePageField', function($event) { $items=($event->arguments[0]->links_utili); foreach ($items as $key) { if (empty(trim($key->title)) || empty(trim($key->url_link)){ //i need to remove the field and show a warning message } } }); I have a repeater named links_utili with 3 fields: title, url_link, active and i want to require url for each title This is the correct approach or is better to implement $this->addHookBefore('Pages::save', function(HookEvent $event) Thank you
  6. Thank you for the response. this is not really what i need to create because the focus is building a veritable CRUD admin interface for existing tables
  7. I need to manage,from PW, differents tables with relations. I need create a custom module with a backend form for manipulate (CRUD) data. There is an existing open source module for learning? Thamk you
  8. Thank you; the code work fine...simply!
  9. foreach($page->images as $image) { echo "<img src='$image->url'>"; } With this code i get all images of a field; but how randomize the order? Thank you
  10. I need retrieve a list DISTINCT of values of a field (city) in a selector. now i have create a foreach Cycle for get the pages $arr=array(); $p=$pages->find(...); foreach($p as $el){ $arr[]=$el->city; } //now unique... But there is a most efficient way? thank in advance
  11. Yes this fixes the issue. Thank you very mutch
  12. I also have this problem....some news?