Jump to content

ngrmm

Members
  • Posts

    446
  • Joined

  • Last visited

  • Days Won

    3

ngrmm last won the day on March 21 2024

ngrmm had the most liked content!

Contact Methods

  • Website URL
    https://www.engramm.com

Profile Information

  • Gender
    Not Telling
  • Location
    Germany

Recent Profile Visitors

6,844 profile views

ngrmm's Achievements

Sr. Member

Sr. Member (5/6)

186

Reputation

2

Community Answers

  1. it's working for me with the code below Please check for typos. Is you page reference filed name really report? And is it a single or multiple page? $call = $pages->get(1234); $report = $pages->get(4321); $new_report = $pages->clone($report); $new_report->of(false); $new_id = uniqid(); $new_report->title = $new_id; $new_report->name = $new_id; $new_report->save(); $new_report->of(true); $call->of(false); $call->report = $new_report; // $call->report->add($new_report); $call->save(); $call->of(true);
  2. @Frank Vèssiaplease check if your page reference field is accepting the template of the new cloned page.
  3. @Bike what do you actually mean by dropdown field? Which type is it? a page reference field? Maybe your dropdownField is an array and not boolean or a string.
  4. You could use a hook to create those new fields and add them to certain templates.
  5. @robert it seems that this module does not work with the latest PW version Schwerwiegender Fehler: Uncaught TypeError: Cannot access offset of type string on string in site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php:189 #0 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(59): ProcessTranslatePage->setLanguages() #1 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(41): ProcessTranslatePage->initSettings() #2 wire/core/ModulesLoader.php (168): ProcessTranslatePage->init() #3 wire/core/ModulesLoader.php (100): ModulesLoader->initModule() #4 wire/core/ModulesLoader.php (111): ModulesLoader->triggerInit() #5 wire/core/Modules.php (338): ModulesLoader->triggerInit() #6 wire/core/ProcessWire.php (775): Modules->triggerInit() #7 wire/core/Wire.php (413): ProcessWire->___init() #8 wire/core/WireHooks.php (968): Wire->_callMethod() #9 wire/core/Wire.php (484): WireHooks->runHooks() #10 wire/core/ProcessWire.php (909): Wire->__call() #11 wire/core/ProcessWire.php (665): ProcessWire->__call() #12 wire/core/ProcessWire.php (613): ProcessWire->setStatus() #13 wire/core/ProcessWire.php (315): ProcessWire->load() #14 index.php (52): ProcessWire->__construct() #15 {main} thrown (Zeile 189 in site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php) Diese Fehlermeldung wurde angezeigt wegen: Sie sind als Superuser angemeldet. Fehler wurde protokolliert.
  6. @couturef i doubt that the module is up to date please check the support thread of the module here:
  7. @Charlie W your question ist not directly related to processwire. You would get or find an answer more quickly on stackoverflow. Or just ask chatgpt, claude, … acme/#sliding is correct. Just make sure that you do not have multiple elements with the same id. Then you link <a href='#siding>siding</a> should get you to your target <div id='siding'></div>
  8. @ryan is it also possible to disable a date range via setting like: $wire->addHookBefore('InputfieldDateRange::getSettings', function($e) { $f = $e->object; if($f->name != 'booking_date') return; // // set Christmas until New Years Day to be disabled // $f->disabledDates = [ '2024-12-25 - 2025-01-01' ]; }); UPDATE: right now I'm doing this // // helper function // function getDatesBetween($startDate, $endDate) { $dates = []; $currentDate = strtotime($startDate); $endDate = strtotime($endDate); while ($currentDate <= $endDate) { $dates[] = date("Y-m-d", $currentDate); $currentDate = strtotime("+1 day", $currentDate); } return $dates; } $wire->addHookBefore('InputfieldDateRange::getSettings', function($e) { $f = $e->object; if($f->name != 'booking_date') return; $disabledDates = getDatesBetween("2024-12-25", "2025-01-01"); // // set Christmas until New Years Day to be disabled // $f->disabledDates = $disabledDates; });
  9. @froot so related_tutor or related_movie, is a page field right? Is it a single or multiple page field? If multiple (by default), then you would need to select one from the array. like: …related_tutor->first->template->fields->skills->label and check this https://processwire.com/api/ref/field/get-label/
  10. I've no idea how to tweak that. But you could also create a custom backend page, see here.
  11. @rushy go here. There are many ways. Maybe one fits you
  12. @leode you also edited your config.php right?
  13. @DrQuincy Matrix repeaters are pages themselves. They are different than usual fields. First you create a matrix type and add content. Then save the matrix page and then you can save your actual page. Each time you add a matrix type a new page is created. You can find these pages in the page tree under admin
  14. @Purple your question is more related to php as to processwire. You better search in stackoverflow for these kind of question. Anyway, you could use a for loop. This code gives you the first images of the first five category children. for ($i = 0; $i <= 4; $i++) { foreach($categories as $category) { $image = $category->children->eq($i)->images->first; } }
×
×
  • Create New...