Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
  • Location
    Neuruppin, Germany

Recent Profile Visitors

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

Matzn's Achievements

Jr. Member

Jr. Member (3/6)



  1. Ok, is no magic. $res->getStart(); etc. PaginatedArray class - ProcessWire API
  2. Hi all, how i can get total, start, limit etc from page object? $res = $pages->find("template=basic, limit=20"); Result from page 2: ProcessWire\PageArray Object ( [count] => 20 [total] => 95 [start] => 20 [limit] => 20 [pager] => 21 bis 40 von 95 [items] => Array ( [Page:0] => Array ( [id] => 17212
  3. @Macrura I have tested something. If add the date field to page or repeater page it works, but not to a fieldsetpage: echo "\nFieldsetPage:\n"; echo $page->Check->ratingDate; echo "\n"; echo $page->Check->getUnformatted("ratingDate"); echo "\nPage:\n"; echo $page->ratingDate; echo "\n"; echo $page->getUnformatted("ratingDate"); echo "\nRepeaterPage:\n"; echo $page->About->businessProvider->first()->ratingDate; echo "\n"; echo $page->About->businessProvider->first()->getUnformatted("ratingDate"); Live Result: FieldsetPage: 19.05.2021 19.05.2021 Page: 19.05.2021 1621375200 RepeaterPage: 19.05.2021 1621429619 It's a bug or i can set somthing?
  4. @wbmnfktr ic know this postes, but no way to get the unix timestamp by $page->getUnformatted('yourDateField'); I also used it in several projects, but now the output must be set for date field to none. So i use this date field only as $page->yourDateField; I also don't understand why one field is save as unix and the other not (same settings).
  5. Hi, i have two date fields. One stores in unix timestamp (ratingDate) the other as a normal date (googlePageSpeedDate). Both have the same settings! How can I influence the saving? The strange thing is that I can't get the unix timestamp by (Check is the FieldsetPage) $page->Check->getUnformatted('googlePageSpeedDate'); ProcessWire\FieldsetPage Object ( [id] => 9932 [name] => for-page-1072 [parent] => /admin_panel_page/repeaters/for-field-389/ [template] => repeater_Check [name1067] => [status1067] => 1 [googlePageSpeedDate] => 2021-05-17 00:00:00 [data] => Array ( [name1067] => [status1067] => 1 [googlePageSpeedDate] => 2021-05-17 00:00:00 ) ) ProcessWire\RepeaterPage Object ( [id] => 1137 [name] => 1618998033-3988-1 [parent] => /admin_panel_page/repeaters/for-field-312/for-page-1075/ [template] => repeater_businessProvider [name1067] => [status1067] => 1 [isSocialMedia] => 0 [businessProviderPage] => (Page) 1132 [rating] => 4,6 [ratingUsers] => 10 [ratingDate] => 1621240175 [urlTo] => https://maps.google.com/?cid=11132489695980159614 [reviewUrl] => [data] => Array ( [name1067] => [status1067] => 1 [isSocialMedia] => 0 [businessProviderPage] => ProcessWire\Page Object
  6. It´s a old post, but i'm looking for this same problems. Hope, helps you, too. It must be noted that if "When output formatting is off the value of an image/files field is always a WireArray" found here to save works only $page->save(image/files field) Example for a custom field "counter" : $page->of(false); $file = $page->csvFiles->first(); $file->counter = "your content here"; $page->save('csvFiles'); Actually easy.
  7. Omg. The issue is caused at php version 8.0.2. Processwire running perfekt to php 7.4. I'm looking for entries in protocolls: nothing. No php error or warnings for this issue. That's mean. @wbmnfktr @BitPoet I thank both of you. Closed
  8. Nothing special. Only add new fields to template and somthing in template output. No. That's the weird thing. I don't touch hooks or other settings. Language only change default backend settings. It's an (almost) new installation. I think slowly it is due to php or something on the server. I've an other similar project. I will to compare this booth.
  9. Ok, then I understood your family restrictions setting. No, in none template set family restrictions. I've already checked everything - what I know. If the template is unused i can change the page to them, but not if used for other page. I despair...😭
  10. No, "Don't allow pages to change their template" is not checked. I'm the superuser and the parent page is home. I'm not sure what do you mean with family restriction by parent page?
  11. Hi. I use a fresh multilanguage site. I only change default language to german. Now i can't chang the page template after use this template for one page, although multiple use is permitted. Some ideas?
  12. @tomaskostadinov and how do you access the fields by language? I found only a solution by suffix. Or there is another solution?
  13. Ok, it seems as if the fields are only translated for the Pageobject. Either you create a page and moves all fields there or you call up the fields of the modules include the suffix as follows: english: myField german: myField__1024 if ($user->language->name != "default") $lable = "__" . $user->language->id; $modules->get('Mymodule')->get("myField$lable");
  14. Hi @Zeka some fields from $page are switch in right language, but not the field from modul. It doesn't matter whether I call up the modul-field in the template or via hook.
  15. Hi. To manipulate the page output i use the hook Page::render. It works for html, php etc without touch the templatefiles. Example i build a modul called "Mymodul" and integrate some multilanguages fields: class MymodulConfig extends ModuleConfig public function getInputfields() { $inputfields = parent::getInputfields(); $ckeditorToolbar ='Format, Bold, Italic, -, RemoveFormat'; $f = $this->modules->get('InputfieldCKEditor'); $f->toolbar($ckeditorToolbar); $f->attr('name', 'myField'); $f->useLanguages = true; $inputfields->add($f); return $inputfields; } } and add it to all pages: public function ready() { if ($this->page->template != 'admin') { $this->addHookAfter('Page::render', $this, 'addSome'); } } public function addSome($event) { ob_start(); eval('?>'.'<?php echo $this->modules->get('Mymodule')->myField ;?>'. '<?php'); $add = ob_get_contents(); ob_end_clean(); $event->return = str_replace("</body>", $add . "</body>", $event->return); } What i'm missing are the variables for $languages and the switching of the multi languages fields from module. Does somebody has any idea why get only the default language field from modul?
  • Create New...