a-ok Posted September 3, 2019 Posted September 3, 2019 I'm looking to return repeater matrix rows (pages) where the type is equal to testimonial $testimonials = $event->pages->find("template=repeater_modules, modules.type=testimonial, include=all"); This seems to return all repeater pages and simply ignores the `modules.type=testimonial` selector. Have I got this wrong? If I barDump out `$testimonials->explode('type')`, one of the entries returned is "testimonial" so I'm a bit confused.
a-ok Posted September 3, 2019 Author Posted September 3, 2019 I ended up just doing foreach ($testimonials as $t) { if ($t->type == "testimonial") { $t->title = $t->getForPage()->title . ' — ' . $event->sanitizer->truncate($t->global_textarea, 40); $testimonialsNew->add($t); } } Which seemed to work fine but I would've though I could've queried by the repeater matrix type within the selector... but maybe not?
dragan Posted September 3, 2019 Posted September 3, 2019 There's a recent thread with a somewhat similar topic here. 1
DV-JF Posted November 15, 2019 Posted November 15, 2019 @dragan I don't have the permission to view this forum, could you please post the solution here?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now