Jump to content

Search the Community

Showing results for tags 'selectors'.

  • Search By Tags

    • selectors ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


  1. I've been having a bit of a struggle converting a page reference field from Select to Autocomplete, as with Select, it's possible to hook getSelectablePages, and the actual page the inputfield is on is available to the hook, but with autocomplete, you have to hook findReady, and the page the field i...
  2. I'm trying to get a page reference field inside a repeater working with autocomplete with dependencies on other repeater fields. I'm using the Selector String option to configure page autocomplete. Currently I have: template=moveStockItem, productVintage=page.vintage.title, sort=page.v...
  3. Find Merge Adds a Pages::findMerge() method that allows multiple PageFinder selectors to be merged into an efficient paginated set of results. This can be useful when you need more sophisticated sorting of results than what would be possible using only the sort value in a single $pages->fin...
  4. Hello, I'm getting stuck trying to build a filter between subcategories and some items. For the final Item itself, I setup a reference field and wrote following selector: If there are more entries, filtering by manufacturer (which is part of the item) would be very helpful. The prob...
  5. Hello, can I use the selector to extract only pages with page titles longer than 10 characters? I'm looking for a way to search directly without using the php foreach statement, as shown below. $result = $this->pages->find("template!=admin, has_parent!=2, include=all"); f...
  6. I'm trying to build a search selector that includes a checkbox multiple option field (clinicdetails_specialisms). The whole selector works fine if I don't include the checkbox field. With it included I get errors like "Error: Exception: SQLSTATE[HY093]: Invalid parameter number: mixed named and posi...
  7. Hello! I have a weird situation going on with my selector field, which I can't really get. I create an array of titles as filter using this logic: firstname=Mike|Steve id=123|124|125 title*=Red|Blue|Green This is the field I am logging: It goes in a for loop till it loo...
  8. I'm having and always have a hard time building PaginatedArrays, I never know where to put the "limit=24" selector so please enlighten me. Here's what I'm doing… $categories = $page->protable('start=0, limit=999999'); // this I need in order to retrieve the pages's "categories" and I don't...
  9. Currently I'm facing the problem that I need to select pages by a specific relation between two field values. Is it somehow possible to do something like $result = $pages->find('template=something, field1>field2'); as it would be possible to do within an SQL query? If this isn't possible, yet...
  10. I want to add a dependent SELECT field on my template page that lists pages from a parent "sub-page" in the current parent node. On /product1/page I have the field "photo" which is a SELECT field. I want the SELECT to list pages from /ROOTPARENT/photos. The idea is that I can reuse the same...
  11. Hello, I've just upgraded to 3.0.165 (and updated my Ubuntu version as well) and on my localhost, I am facing a weird issue : all my requests having the ~= selector cause a Mysql error with this message : PDOException #HY000 SQLSTATE[HY000]: General error: 3685 Illegal argument to a re...
  12. I want to allow full text search on my site. There is a very nice solution that comes right out of the box: $selector = "title|body~=$q, limit=50"; This works, but to make it even better I would want to give higher weight to pages where the search term occurs in the title, than if it just oc...
  13. Hi! I have two Page Reference fields: Category and Subcategory. Category is parent of Subcategory, and can have 0 to n Subcategories. Fields are selected by dropdown selection. I'm trying to achieve following logic: 1. Select Category (obviously works) 2. Change Subcategory optio...
  14. I'm working on a news feed that will show the most recent news in a full teaser grid, and all older news as a simpler archive-type list view. My selectors so far: $news_full = $page->children("template=news, limit={$page->feed_count_full}"); $news_archive = $page->children("template=news, start=...
  15. I played with the Selectors object and would like to use it for a special use case... That is a custom Selectors object with dummy data converted to an php array to see the structure (Selectors object is a WireArray with "fields" added) Array ( [0] => Array ( [0] =>...
  16. Hello. I'm really enjoying going into ProcessWire after using Drupal, CodeIgniter and FuelPHP for a while. Anyway my first question is with this bit of code $items = $page->siblings("template=portfolio-item, sort=random, path!={$page->path}"); As you can see, I'm trying to get siblings of th...
  17. <?php $Cats=$pages->find("parent=1086, id!=$page, sort=sort"); foreach($Cats as $Cat) { echo " I have a selector that pulls in 4 child pages of a parent and the order is set to reflect the order of the tree. My client has asked that instead of Cat 1 | Cat 2 | Cat 3 | Cat 4 we ins...
  18. Hi there! And thanks for Processwire! It appears that i've found something interesting about PW selectors. They should only be strings! Here's an example of SQL-like syntax for selector: $my_complex_selector = " name='some name', parameter=123, other_parameter=[subparam>=subvalue] "; Try...
  19. Apologies if this has been covered. I tried a search but didn't hit the usecase I'm after. I currently have category pages listing their children products. Someone asked me to put a product in multiple categories, so I created a Page Reference field called prod_othercategories which lets a user...
  20. I don't know if this is the right place, it's not really a tutorial, just a tip based on notes I wrote myself in a recent project to get it straight in my own head. I thought it might be useful for others in a similar situation. Scenario: Create a search function that will search for keywo...
  21. Hello girls and guys, i just saw that if I use a selector on a textarea, for example $pages->find('body%=notes') it also find that key in html classes and attributes. For example it will find <p class="text-notes">Lorem ipsum dolor sit amet cosectetur.</p> Is there a way to avoid...
  22. Hi there! And thanks for Processwire! This is rather a question than a feature request, maybe there's a well known solution which i missed. So what about aggregation in selectors? Let's suppose we have a PW-powered shop where any product has a rating made by customers. Every time the user...
  23. Hi, I'm having problems with seatching for a value in repeater. One of pages have attached repeater called 'insight_repeater'. This repeater has h1_tag (text field) and i'm trying to search for repeater items that contains 'lor' phrase. And right now i'm trying to do simple search, looking...
  24. Hi all, I'm having an odd issue that I think is down to the selector I'm using but I can't track down the cause! I'm using front-end AJAX search form on a list of product adverts (pages) where the product is made by a certain manufacturer (vendor). The manufacturer is chosen buy the perso...
  25. Hello there! And thanks for Processwire! It may appear a noob question but what about selectors like "field1=val1||field2=val2"? I mean that the page we're looking for should have field1=val1 OR field2=val2 . There's plenty of examples for cases like "field=val1|val2" but it's another case....
×
×
  • Create New...