nabo

Members
  • Content Count

    44
  • Joined

  • Last visited

Community Reputation

8 Neutral

1 Follower

About nabo

  • Rank
    Jr. Member

Recent Profile Visitors

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

  1. 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;
  2. 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
  3. 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;
  4. 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
  5. nabo

    Hi Bernhard and thanks for your attention. I used your tip in a bad way... now it works
  6. nabo

    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
  7. 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
  8. nabo

    Sorry... it was a problem with field access!!
  9. nabo

    Someone has already asked but... no way for multi-language? I think that multi-language support should be the first thing to take care when developing a new module
  10. nabo

    Hello I discovered a very strange problem I can not how to solve... I use this $meta_title = $page->meta_title!="" ? $page->meta_title : $page->title; In normal navigation everything work perfectly... but in private mode (incognito), system seems to ignore meta_title and writes the page title. Any idea??
  11. Hello is there a way to generate a different size image via api during the same process of import? product->setOutputFormatting(false); $product->images->add($file_url); $product->save();
  12. sorry... solved :-/
  13. Hi all... i tried and searched (maybe not enough, sorry ) I've got an offer template with a multiple page reference with stores. I would like to get all offers associated with a store. Template: offer store -> page reference (multiple)
  14. Sorry all... found it!!!!!!!!!! I need to activate other languages for any single store! Is there a way to do a massive update?