Jump to content

Nils Wiere

Members
  • Content Count

    26
  • Joined

  • Last visited

Community Reputation

16 Good

About Nils Wiere

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

Contact Methods

  • Website URL
    http://www.nilswiere.de

Profile Information

  • Gender
    Male
  • Location
    Hamburg

Recent Profile Visitors

1,166 profile views
  1. Addition: It turns out that pre-selection doesn't work here in combination with selectors. What I did: I chose a "Default Selected Option" and made the field required. When editing the page, the selected default option is highlighted correctly in the UI and I can echo the values in the frontend – but when using selectors, the value is not considered. If I change the value of the toggle when editing a page, hit save and change it again + save, it works with selectors. Is there an approach to make it work with pre-selection? That would be important in my case.
  2. Hi @ryan, the toggle addition sounds really nice. I just set it up with the "integer" option and I can echo the values 0 and 1 for every item in the array correctly. However, when accessing the toggle (named "toggle_katalog") inside a selector, such as $products = $productFolder->children("sort=title, toggle_katalog=1"); I get zero matches. But there are actually hundreds of items with a value of 1. Am I missing something? I'm using PW 3.0.147. Thanks and best Nils
  3. Hi @ryan, I really like the idea of the new redirect URL management. Do I have to enable it somewhere, so it automatically adds previous URLs? After changing the page name several times, the panel still shows "Did not find any…" (see attached screen). (Logged in as superuser, using ProcessWire 3.0.146)
  4. 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…
  5. 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:
  6. 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
  7. 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
  8. 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.
  9. Nils Wiere

    Lister

    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?
  10. 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!
  11. 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".
  12. 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?
  13. 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?
  14. Hi neonwired, so you added the live domain to the config.php like this, right? $config->httpHosts = array('www.livedomain.tld', 'livedomain.tld');
  15. 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
×
×
  • Create New...