• Content count

  • Joined

  • Last visited

Community Reputation

10 Good

About ngrmm

  • Rank
    Sr. Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,313 profile views
  1. i manage to get it this way. but i think there should be a better way echo "<div class='items'>"; $odd = array(); $even = array(); echo "<div class='odd'>"; foreach ($allPages as $k => $v) { if ($k % 2 == 0) { $even[] = $v; echo "<div>$v</div>"; } } echo "</div>"; echo "<div class='even'>"; foreach ($allPages as $k => $v) { if ($k % 2 !== 0) { $even[] = $v; echo "<div>$v</div>"; } } echo "</div>";
  2. i have an array of pages $allPages how can i divide them in two groups of odd and even? right now i have them in one line. but i want to have them in two groups. $allPages = $xPage->children; $counter = ""; foreach ( $allPages as $item ) { $counter +=1; if($counter == 1) { echo "<div class='columns-wrapper odd'>$item</div>"; } elseif($counter == 2) { $counter = 0; echo "<div class='columns-wrapper even'>$item</div>"; } } is there a easy way in processwire to get these two arrays? $allPages_odd $allPages_even
  3. i have pages with children. the children pages have date-fields i there a way to sort these pages in the pagetree by the children-fields can ListerPro do that?
  4. your file is a png. maybe somewhere in the process, the image is saved as jpeg and this causes an error.
  5. this works $uniques = new \ProcessWire\PageArray(); foreach($p as $item) { $uniques->import($item->category); }
  6. $p are all the pages all $p have a page-reference-field $cat first i exclude all the pages in $p which has no value for $category (multi-field) $p = $pages->find("template='xy', category!=''"); now i want to get an array of all values stored in the $category-Field of these pages.
  7. hmm … module didn't work (pw 3) but when i use the detection library and it works // Include and instantiate the class. require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect; // Any mobile device (phones or tablets). if ( $detect->isMobile() ) { }
  8. @SamC my option-titles are words and not numbers. i don't know if that will work.
  9. the missing '}' was a incomplete copy/paste however i found another solution which works fine: $n = $article->view; $thumbs = $article->images->find("limit=$n");
  10. i'm using an option-field ($page->number) and slice() fot outputting different number of thumbs in each article echo $n works fine, it outputs 1 or 2 or 3 … but when i use slice(0, $n), i'm getting the first item. did i forgot something? $articles = $pages->find("template=project, sort=-date "); foreach ($articles as $article) { $n = $article->number; //option-field 1 or 2 or 3 or 4 … $thumbs = $article->images->slice(0, $n); foreach($thumbs as $thumb) { echo "<img src='$thumb->url' >"; }
  11. yes similiar. your site has events at some days. i need the opposite of that. if there is no reservation you can choose the date. that would be perfect for the contact-form! the next thing i need, is just an overview of a complete year. it hasnt to be interactive, no links at all. just a plain overview showing which days are reserved and which free. my question ist how to output a complete year and how to combine the exsiting reservated days with the output.
  12. the user can fill a form with two dates. when submitted, data will be saved as a page (unpublished) with these two date-fields. then admin can publish the page. is there a way just to output an overview of a year (screenshot) with all days having classes like free or reserved?
  13. still having problems. newly added events won't show up in frontend. i guess this has something to do with cache/tables. i have to delete it manually, is there a way the module would do that automatically?
  14. hi @Can i installed the module. it's working at the back-end but doesn's show up on front-end. do i have to embed it manually in templates? PW 2.8.35
  15. ah changed line:29 in FacebookEvents.module to: const FB_PAGEEVENTS_URL = '%sv%s/%s/events/?fields=%s&access_token=%s&since=%s&until=%s&limit=50';