Tom. Posted June 2, 2021 Posted June 2, 2021 Hello, I haven't actually used ProcessWire for a while as I've been using Webflow to build websites recently. I am actually looking at doing my own version of Udesly that interfaces with Webflow, so people can export from Webflow to make ProcessWire themes... Anyway. I was wondering why the example of Text Tags uses: $wire->addHook("/find-field_options/", function($e) { $q = $e->input->get("q", "text,selectorValue"); if(strlen($q) < 3) return []; return array_values($e->pages->findRaw("parent=/tags/, title%=$q, field=title")); }); I thought the correct way of using findRaw is: $e->pages->findRaw("parent=/tags/, title%=$q", "title")
adrian Posted June 2, 2021 Posted June 2, 2021 @Tom - I think the field=title within the quotes selector, vs having the list of fields in a separate quoted group is optional either way. The "array_values" is needed because the text tags needs the array to be indexed numerically starting at zero, rather than the page IDs which findRaw() returns.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now