Jump to content

Raymond Geerts

Members
  • Posts

    365
  • Joined

  • Last visited

  • Days Won

    5

Raymond Geerts last won the day on June 14 2023

Raymond Geerts had the most liked content!

About Raymond Geerts

  • Birthday 07/12/1975

Profile Information

  • Gender
    Male
  • Location
    The Netherlands

Recent Profile Visitors

13,127 profile views

Raymond Geerts's Achievements

Sr. Member

Sr. Member (5/6)

524

Reputation

11

Community Answers

  1. Hello Marc, I have sent you a reaction as private message. Working mostly from home is an option.
  2. Hello JeevanisM, Indeed for this position we are looking for people who have a good command of the Dutch and English language. Initially, this was in the original job offer, but we didn't consider there would be interest internationally. We have added the line about language now to the job offer.
  3. Agrio is a medium-sized publisher with more than 70 employees and offers a leading cross-media agricultural portfolio. In the more than 30 years that Agrio has existed, we have managed to gain the position of market leader, with the highest reach in the agricultural in the Netherlands. In addition, our customers know where to find us for various printing, web design, copywriting, video productions and graphic design. Agrio does all this with a lot of passion and a proactive attitude. Farmer sobriety predominates. Independence, job satisfaction and growth are important core values within the organization. There is always room for new talent. We currently have room for a PHP Developer in our Media and Design department. https://www.agrio.nl/vacatures/php-developer/
  4. This is great news for our dev team. I can image it took some effort to dig into this but i am glad you found the bottle neck. I can imagine, when the parents table will contain less page parent references, this might give an overall performance boost with large sites that have a lot of repeater (matrix) pages.
  5. After doing a fresh install of MySQL 5.7 on macOS High Sierra, the installer generates a temporary password for the root user. The problem is as soon the installer is finished, the given root password is already expired. Resulting in not being able to login as root to MySQL. It took me a while of reading, fiddling around, and trying all kinds of tips and examples on how to reset the root password. The following worked for me. And in the hope it an help somebody else, and for backup purposes, I'll leave it here. Open the following folder in a Terminal window: /usr/local/mysql/bin Type in (copy + paste) the following commands, where `xxxxxxxx` is the desired root password: ./mysql -u root -p --connect-expired-password SET PASSWORD FOR 'root'@'localhost' = PASSWORD('xxxxxxxx'); UPDATE user SET authentication_string='xxxxxxxx' WHERE User='root' The last line with the UPDATE command was necessary for me to finish the process.
  6. Thanks guys for the answers. Altough DOMSubtreeModified did work i found a solution that did'nt involve JS at all. But instead i made a hook to manipulate the PageList item labels.
  7. No answer yet, just stumbled on this topic, since i was looking for this too. Is there any way to listen, observe in javascript to fire an action when the PageList loading / rendering is completed. In that i mean on init, but also when user pagination or alike.
  8. I solved the update issue as follow: - before touching the repeater matrix field, count the already existing (n) repeater matrix items. - add all the new (updated) repeater matrix items, including the repeater items inside the repeater matrix. - remove the first (n) repeater matrix items from the field.
  9. Still having some difficulties here when updating a repeater inside a repeater matrix. Somehow it is not possible to use the same code for adding a new page, and updating the same page with a repeater inside a repeater matrix, as shown in the below example. I do not seem to be able to update the page, and keep getting the following error message: Error: Exception: Can't save page 0: /1486742936-8959-4/: It has no parent assigned (in /Users/raymond/Dropbox/www_domains/testing123/htdocs/wire/core/PagesEditor.php line 464) The code to add a new page, and data to a repeater inside a repeater matrix. $urls = array( 'https://www.youtube.com/watch?v=e5gvzCOhBLQ', 'https://www.youtube.com/watch?v=rbhnkeh9liQ', 'https://www.youtube.com/watch?v=poRFOvxyOWI' ); /** * First run, adds new article page * */ $options = array( 'template' => 'article', 'parent' => $parent = $pages->get('template=articles'), 'title' => 'This is a test', 'date_pub_start' => time() ); $p = $pages->add( $options['template'], $options['parent'], $options ); $p->of(false); // repeater_matrix_content - type: intro $intro = $p->repeater_matrix_content->getNew(); $intro->repeater_matrix_type = 1; // intro $intro->intro = 'Lorem ipsum'; $p->save('repeater_matrix_content'); // repeater_matrix_content - type: text $text = $p->repeater_matrix_content->getNew(); $text->repeater_matrix_type = 2; // text $text->body = 'Lorem ipsum dolor sit amet'; $p->save('repeater_matrix_content'); $videos = $p->repeater_matrix_content->getNew(); $videos->repeater_matrix_type = 4; // videos $videos->save(); foreach($urls as $url) { if (empty($url)) continue; $repeater_video = $videos->repeater_videos->getNew(); $repeater_video->link_url = $url; $videos->save('repeater_videos'); } $p->save('repeater_matrix_content'); The code to update the just added page. (not working). Note that the code for adding the repeater matrix items are identical to the above code. The first two items of the type (1=intro, 2=text) are succesfully added and saved. The problem occurs when trying to add repeater items to the repeater matrix type 3=video. What am i doing wrong? $options = array( 'template' => 'article', 'parent' => $parent = $pages->get('template=articles'), 'title' => 'This is a test', 'date_pub_start' => time() ); /** * Second run, updates existing article page * */ $id = $p->id; unset($p); $p = $pages->get($id); $p->of(false); $p->title = $options['title']; $p->date_pub_start = time(); $p->save(); foreach($p->repeater_matrix_content as $rp) { $pages->delete($rp, true); } // repeater_matrix_content - type: intro $intro = $p->repeater_matrix_content->getNew(); $intro->repeater_matrix_type = 1; // intro $intro->intro = 'Lorem ipsum'; $p->save('repeater_matrix_content'); // repeater_matrix_content - type: text $text = $p->repeater_matrix_content->getNew(); $text->repeater_matrix_type = 2; // text $text->body = 'Lorem ipsum dolor sit amet'; $p->save('repeater_matrix_content'); $videos = $p->repeater_matrix_content->getNew(); $videos->repeater_matrix_type = 4; // videos $videos->save(); foreach($urls as $url) { if (empty($url)) continue; $repeater_video = $videos->repeater_videos->getNew(); $repeater_video->link_url = $url; $videos->save('repeater_videos'); } $p->save('repeater_matrix_content');
  10. Thanks @BitPoet it works very well. I removed the ->add from all my code and all other repeater matrix items are still 'added' just fine by getNew().
  11. Can any one point me in the right direction / or give a working example how to add repeater items to a repeater field inside a repeater matrix field. I tried many different approaches, reading many topics on the forum, but can not get it working. The following example gives an error about not being able to add page with ID 0 $rpm = $page->repeater_matrix_content->getNew(); $prm->repeater_matrix_type = 1; $prm->save(); $prm->of(false); foreach($videos as $video) { if (empty($video['url'])) continue; $rp = $prm->repeater_videos->getNew(); $rp->save(); $rp->link_url = $video['url']; $rp->save(); $prm->repeater_videos->add($rp); } $prm->save(); $page->repeater_matrix_content->add($prm);
  12. Perhaps that can be solved by 'faking' the PageArray as shown by LostKobrKai $pa = new PageArray(); $pa->setTotal($total)->setLimit($limit)->setStart($start); $pager = $this->modules->get('MarkupPagerNav'); $pagination = $pager->render($pa);
  13. This example works by adding (prepending) an item to the list. What i'm looking for is a way to manipulate the `start` value and wonder if the following might do the trick. <?php $limit = 10; $limit_first = 8; $offset = $limit_first - $limit; if ($input->pageNum == 1){ $products = $pages->find("template=product, sort=-date_pub, start=0, limit=$limit_first"); } else { $start = (($input->pageNum - 1) * $limit) + $offset; $products = $pages->find("template=product, sort=-date_pub, start=$start, limit=$limit"); }
  14. I was wondering how to achieve the following. A total of 100 pages which are listed with a limit of 10 items per page, resulting in 10 pages of 10 items. Instead i desire the following (below), and wondering how to setup the code / selector(s). The first page should show a list of 8 items. After that all following pages should have a limit of 10 items. page 1 -> items 1 - 8 -> (limit 8) page 2 -> items 9 - 18 -> (limit 10) page 3 -> items 19 - 28 -> (limit 10) ... page 9 -> items 79 - 88 -> (limit 10) page 10 -> items 89 - 98 -> (limit 10) page 11 -> items 98 - 100 -> (limit 10) The ideal situation would be to have an extra page selector property aside of 'limit', something named 'limit_first' or alike.
×
×
  • Create New...