Jump to content

Recommended Posts

Posted

Is it possible for a selector (for search results) to return a page if the title is 'Kettle's' but the search term is 'kettles'? I can't include 'name' in my fields to search (which would've worked) but then if someone searched 'Kettle's' for the page title 'Kettles' it wouldn't work.

Thoughts?

Posted

Yeah tried them all.

$results = $pages->find("$fieldsToSearch%=$searchQuery, template=$templatesToSearch, sort=sort, check_access=0");

$resultsToRemove = new PageArray();
foreach ($results as $result) {
	if ($result->template->name == 'repeater_modulesA' && ($result->getForPage()->is('unpublished') || $result->getForPage()->is('trash'))) {
		$resultsToRemove->add($result);
	}
}
$results = $results->not($resultsToRemove);
Posted

Yes. Just did too. They all fail, sorry.

55 minutes ago, a-ok said:

can't include 'name' in my fields to search

Why can't you?

Posted
1 hour ago, kongondo said:

Why can't you?

It’s having a weird conflict with the multiple pageField.title in the selector. If I have one and name, it works fine, if I have multiple without name it works fine. If I have multiple AND name it throws an error referenced here: 

 

  • Like 1
  • 2 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...