Nils Wiere

  • Content Count

  • Joined

  • Last visited

Community Reputation

13 Good

About Nils Wiere

  • Rank
    Jr. Member
  • Birthday 12/25/1980

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location

Recent Profile Visitors

910 profile views
  1. Nils Wiere

    Hello Robin, thanks for bringing light to this issue. The entity encoder textformatter really didn't come to my mind here. Now it makes perfect sense…
  2. Nils Wiere

    Hello, didn't think about matching the id's – that works perfectly. Thanks! However, matching the title still doesn't work when using an "&" in the title. As soon as I exchange the character it works:
  3. Nils Wiere

    Hi Tom, Thanks for the quick reply! I shortened the code a bit for the forum and it was meant to be: $pages->find("brand.title=$brand"); But yes, that's what I am looking for and using selectorValue works with many special characters, but it still doesn't work with the &-character in the page title. As soon as I change the ampersand to "and" I get the expected results. I also tried it with a clean installation of ProcessWire (3.0.118) without the expected results: $brand = $page->title; // page title is "A & B" // find pages where page reference field brand is set to "A & B" $products = $pages->find("brand.title=A & B"); // works $products = $pages->find("brand.title=$brand"); // doesn't work $products = $pages->find("brand.title=" . $sanitizer->selectorValue($brand) ); // doesn't work
  4. Nils Wiere

    Hello, this must be an easy one, however, I can’t get the selector to work. I have a brand page where the brand’s name is the title of the page. I then find all products that have this brand assigned through a page reference field. That works fine using this code: $brand = $page->title; // brand is the page reference field $products = $pages->find("brand.title"); However, whenever there's a special character like an ampersand in the brand's name, it doesn't return any results. I know how use sanitizer for the $brand variable. But then I also need to sanitize the selector so it matches the sanitized $brand variable, right? How would I do that? Thanks, Nils
  5. Nils Wiere

    Yes, Snipcart could be a good choice. You can easily integrate it with ProcessWire and set up all the relevant product info inside PW. Plus, it supports invoicing, tax and currency setup per country, voucher codes, different shipping and payment solutions and a responsive checkout modal. However, customization of the checkout modal can be a little tricky, if you need to add or remove fields.
  6. Nils Wiere

    Just a quick question: Does Lister support Repeaters? When I add filters that include Repeaters, Lister shows the corresponding fields and values in the filter section which is nice. However, whatever I choose, it returns zero results. I know that Repeaters are also pages. But those are hidden in the admin. Maybe that's why Lister can't show them?
  7. Nils Wiere

    Hi Evan, oh, I just overlooked your reply – thanks! However, using ProcessWire 3.0.62 (the newest master) I still can't save any bookmarks within lister. I get the same error message as before (see attached screenshot). Does anyone have an idea? I'm working on a content-heavy site and it would be great to get lister bookmarks to work. Thanks!
  8. Nils Wiere

    Hi Sérgio and Robin, thanks a lot for helping out. So the Connect Page Fields module seems to be interesting for the page reference approach – I'll check that out later today. For now, I took the repeater approach, and your three bullets were essential in achieving the goal, @Robin S. That's how I do it: 1. I search for date repeaters by treating them as template (by putting "_repeater" before the field name); I can now sort and limit the array to my tasting 2. I set "check_access=0" so that all users can see the results 3. I get field data from the page the repeater is living on by using the getForpage() method. $allEvents = $pages->find("template=repeater_event_repeater_datetime, event_datetime>today, sort=event_datetime, limit=14, check_access=0"); foreach ($allEvents as $event): echo "<h4>$event->event_date</h4>"; echo "<h5>{$event->getForpage()->event_title}</h5>"; echo "<p>{$event->getForpage()->event_desc}</p>"; endforeach; So far, that works great. Since there are some tricks involved I didn't know before, I'll keep checking, if there are any "side effects".
  9. Nils Wiere

    For one of my projects, I'm currently building a small events calendar in ProcessWire. One requirement is that an event may have an unlimited number of associated dates. I tried two approaches, however each approach come with a difficulty: 1) One page per event with a repeater that holds the dates. Page: Event 1 Text fields for shared event info Repeater with a date field (e.g. Jan 1, Feb 1, ...) Page: Event 2 Text fields for shared event info Repeater with a date field (e.g. Jan 10, Jan 11., ...) Problem: How can I get a chronological list with all events (dates + shared info) that is sorted like that: Jan 1, Event 1 info Jan 10, Event 2 info Jan 11, Event 2 info Feb 1, Event 1 info ... I know how to access repeaters, however all I got so far is a list structured like that: Event 1 info Jan 1 Feb 1 Event 2 info Jan 10 Jan 11 2) A page with a page reference field from which the backend user shall be able to directly create child pages for each associated date. Problem: What selector string do I need in the page reference setup, to make sure the new page is always created as child of the current page (no matter where that page lives in the backend structure)? Or is this only possible with custom PHP code in ready.php? Would you consider one of those approaches a good strategy? If so, do you have any solution to my problems? If not, is there a better way?
  10. Nils Wiere

    Hi there, I want to create bookmarks based on lister searches. However, whenever I click "submit" after I configured my lister search, I get the error message "Unrecognized path" and the addition "The process returned no content." In that case this URL is opened: http://domain.tld/admin/page/search/edit-bookmark/#tab_bookmarks I am using PW 3.0.42 and Lister v0.2.4 β. I don't use Lister Pro (which is the case in this topic). I tried it with different PW installations and always got the same error. Do you have any idea?
  11. Hi neonwired, so you added the live domain to the config.php like this, right? $config->httpHosts = array('www.livedomain.tld', 'livedomain.tld');
  12. Hello Zilli, you should be able to echo the title of the current language like this: echo $user->language->title; You can set the title of the language under Setup->Languages in the backend. Best, Nils
  13. Nils Wiere

    I knew there's an easy solution (as always in ProcessWire) – thanks Zeka! I wasn't aware that we have a sort option "parent.sort". So for me, this was the solution: $products = $pages->find("template=B, sort=parent.sort, sort=sort");
  14. Nils Wiere

    This must be simple, however, I couldn't figure out how to do it. I got this structure in the admin tree: Page 1 [Template A] Children 1-1 [Template B] Children 1-2 [Template B] Children 1-3 [Template B] ... Page 2 [Template A] Children 2-1 [Template B] Children 2-2 [Template B] ... Page 3 [Template A] Children 3-1 [Template B] ... What I want in the front end, is this sort order: Children 1-1 Children 1-2 Children 1-3 Children 2-1 Children 2-2 Children 3-1 Plus, the order should depend on the order in the admin tree. So, if I move Page 3 on top of the tree, the children of Page 3 should appear first. I tried this, but the order seemed to be random (without a connection to the order in the admin tree): $pages->find("template=B, sort=sort"); I also tried this, and again I got a random looking order: $pages->find("root.template=A, sort=sort"); Do you have any idea? Thanks, Nils
  15. Nils Wiere

    Hi there, many thanks for your help. I just updated to 2.7.1 and for some reason everything works fine now. Thanks and best, Nils