Jump to content

nabo

Members
  • Content Count

    58
  • Joined

  • Last visited

Community Reputation

9 Neutral

1 Follower

About nabo

Recent Profile Visitors

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

  1. Sorry... it was a Croppable Image field. I switch to ImageField and now it works!
  2. Hello I recently switch a Processwire site from 2.8 to last version (3.0.126). I had some little things to fix but it has been easy. But now I notice a problem on ImageField. I attached a screenshot I can't see image... but there's
  3. nabo

    Find users

    Hello is there a way to find users using Page Lister? I know that I can use Access Lister under Users... but what I really need is the bookmark feature that unfortunately is not presente here.
  4. Thanks... I see. But I can't understand why this warning
  5. Hello I attached a screenshot of the problem I see in any user edit page
  6. Hi when I upload a file via custom file the name is changed. I think that there's a core sanitizer... eliminates spaces, double spaces and replace any strange character with _ What's the rule behind?
  7. Hello I can't get the title in other language than default $type_materials = $fields->get('material_tipology'); foreach ($type_materials->type->getOptions($type_materials) as $type_material) { echo $type_material->title; } this works but I get only default title in every language.
  8. SOLVED case 'FieldtypeFieldsetPage': $rdata = []; $rdata["label"] = $field->$label ? $field->$label : $field->label; foreach ($field->repeaterFields as $i) { $l = wire('fields')->get($i)->$label ? wire('fields')->get($i)->$label : wire('fields')->get($i)->label; $rdata[$l] = $p->$field->get($i); } $pdata[$field->name] = $rdata; break;
  9. Thanks... but, again, this is not problem since I get ALL fields with this foreach foreach ($field->fields as $f) { instead of fields related to fieldsetPage
  10. Thank @elabx but the problem is not there. It's here case 'FieldtypeFieldsetPage': $rdata = []; foreach ($field->fields as $f) { $rdata[$f->name] = $f->get($f->name); } $pdata[$field->name] = $rdata; break;
  11. Hello, this is my code $p = $pages->get("/".$pageId."/"); if($p->id) { $pdata = ["id" => $pageId]; // array for storing page data with added page id $p->of(true); // set output formatting to false before retrieving page data // loop through the page fields and add their names and values to $pdata array foreach($p->template->fieldgroup as $field) { if($field->type instanceof FieldtypeFieldsetOpen) continue; $value = $p->get($field->name); switch ($field->type) { case 'FieldtypeOptions': $pdata[$field->name] = $p->get($field->name)->title; break; case 'FieldtypeFieldsetPage': $rdata = []; foreach ($field->fields as $f) { $rdata[$f->name] = $f->get($f->name); } $pdata[$field->name] = $rdata; break; default: $pdata[$field->name] = $field->type->sleepValue($p, $field, $value); break; } } $response = $pdata; I'm trying to get all fields and values from a FieldtypeFieldsetPage (I think that for a repeater is the same)... but it doesn't work... I got ALL fields with null value
  12. Hi Bernhard and thanks for your attention. I used your tip in a bad way... now it works
  13. Sorry, maybe I was not too clear... $exhibitions = new PageArray(); foreach ($events as $event) { foreach ($event->event_exhibition as $exhibition) { $exhibitions->append($exhibition); } } $exhibitions->sort("event_first_date"); foreach ($exhibitions as $exhibition) { echo $exhibition->parent->title; } This change $exhibitions->append($exhibition->getForpage()); doesn't work. I think "parent" works for page but not for repeater
  14. Hi $exhibitions = new PageArray(); foreach ($events as $event) { foreach ($event->event_exhibition as $exhibition) { $exhibitions->append($exhibition); } } $exhibitions->sort("event_first_date"); each event use repeaters for exhibitions. I need to print all exhibitions but at the same time I need the title of the event... I tried $exhibition->parent->title.... but it's not working
×
×
  • Create New...