Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom field array search ??? #69

Open
abooks23 opened this issue May 31, 2019 · 0 comments
Open

Custom field array search ??? #69

abooks23 opened this issue May 31, 2019 · 0 comments

Comments

@abooks23
Copy link

abooks23 commented May 31, 2019

Hi !
I have custom field in page header

author:
'1111'
'2222'
'3333'

tntsearch.php

public function onTNTSearchIndex(Event $e)
 {
     $page = $e['page'];
     $fields = $e['fields'];
    if ($page && $page instanceof Page && isset($page->header()->author)) {
        $author = $page->header()->author;
        if (is_string($author)) {
            $fields->author = $author;
        }
    }
}

reuzlt = 0

if author:'1111' rezult not null
how search field value in array???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant