Search join title and subtitle in the titleField of my site search engine

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 10, 2022   (RSS)

By Mikey - February 4, 2022 - edited: February 4, 2022

I have a news section that has a title and subtitle for the new articles. I need to return search results for both the title and subtitle combined together.

I am trying to change 'titleField' => 'title',  into 'titleField' => 'title.' '.subtitle, but what I have here doesn't work. It's been a long day and I'm too exhausted to think on this. Any suggestions on what I have wrong here?

$searchTables['news'] = array(
 'viewerUrl'       => 'news-article.php',
 //'titleField'      => 'title',
 'titleField'      => 'title.' '.subtitle,
 'summaryField'    => 'content',
 'searchFields'    =>  array('title','summary','content','keywords','categories'),
 'field1'       => 'createdDate',
);

Thanks, Zicky

By Mikey - February 10, 2022

Thank you Daniel!!