Jump to content

Selector operator


mel47
 Share

Recommended Posts

Hi

Have a problem for searching pages.

I have member template with 2 fields : title (example value : Mélanie Tremblay) and alias (example value : Mélanie A. Tremblay)

I want to search for either those fields

$publi = $pages->find("template=publication, categ_publi=$c, author~={$page->title}|{$page->alias}, sort=-year");

This selector works if both fields are filled. But if I only have title, I get an error: '~=' is not implemented in FieldtypePage. If I put only author={$page->title}|{$page->alias}, it found results only if alias field is empty.

What syntax I should use?

Thanks!

 

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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