Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

28 Excellent

About Tyssen

  • Rank
    Distinguished Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Brisbane, Australia

Recent Profile Visitors

4,447 profile views
  1. Every page is going to use the repeater matrix but only the home page is going to need to have the repeater as well so I was trying to find a solution that would keep the repeater option out of the matrix field, but I guess it's not that big a deal really, so I'll go with that.
  2. Thanks guys, I think I have it working, but I'm waiting for feedback from the content editor because I'm unsure if the output is as expected.
  3. I have two fields on a page, one a normal repeater and the other a repeater matrix. What I want to be able to do is allow the content editors to choose to insert the content from the normal repeater field in between other content in the repeater matrix field. I thought I could insert some text into the repeater matrix and then do a conditional in my templates to check for that string and insert the other field's output there. My template looks like this at the moment: home.php $inserted = 'Data from the normal repeater field created with a foreach loop'; $page->render('repeater_matrix_field'); repeater_matrix_field.php foreach($value as $item) : echo $item->render(); endforeach; matrix_body.php if($page->heading=='Replace this') : echo $inserted; else: echo '<h2>'.$page->heading.'</h2>'; endif; I don't get any output I guess because the $inserted variable doesn't get passed from home.php to the other templates. So is there a way to do that, or is there a better way to achieve what I'm trying to do?
  4. I then get an error on the next line. And in testing whether $randomPage was actually returning anything by just outputting the page title, I'm getting instead of repeater items randomised from Pages A–E.
  5. With $randomPage = $pages->get("id=1049|1053|1055|1059|1152")->findRandom(1); or getRandom(1) I get
  6. I have a series of pages that use a repeater field and I want to fetch 3 random rows from each repeater from 5 specific pages, so that I'll have a total of 15 items output, but then also randomise the output so that items from the same repeater field aren't next to each other. Originally I had $selected_pages = $pages->getById([1049,1053,1055,1059,1152]); foreach($selected_pages as $selected_page) : foreach($selected_page->repeater_field->getRandom(3) as $item) : Output endforeach; endforeach; That gave me the pages randomised, but also gave me the items from each page's repeater next to each other. So then I tried $selected_pages = $pages->get("id=1049|1053|1055|1059|1152")->repeater_field->find("limit=15, sort=random"); but that's just randomly pulling 15 items from the first page, the one with id 1049. How do I go about randomising both the pages and the repeater items as well?
  7. Yes it is. I'm contacting the hosting company about it now. Why would it only be triggered after adding a second textarea field though when the first one works fine? :?
  8. I have a repeater field that contains title, an image field and two text fields, one for teaser and one for body. I can add data to all the fields except the teaser OK and save the page. As soon as I try adding text to the teaser field, I get a 403 error. The teaser field was using CKEditor, but I've now changed it to just a plain textarea but still get the same error. Anyone know what might be causing that?
  9. Yep, that did it. In all the Googling I've done on how to do this, that page in the docs never came up. The ProcessSetupPageName module did though which is why I attempted to use that first.
  10. No, single language. But just in case, where would that be set?
  11. I also tested "string".date(U) and got tue-12-feb-2019-15-30-03-1000australia-brisbane2019-02-12t15-30-03-10-0003pmtue-12-feb-2019-15-30-03-10003australia-brisban
  12. That's what I can't work out, because date(U) is all that's there.
  13. I'd actually installed the SetupPageName module before I realised there was a native name format for children field but with it installed, I got errors when trying to add new pages, so I installed it. But I wonder if it's done something which is causing this behaviour? Oh, and I don't have anything in init or ready which would be causing it.
  • Create New...