简体   繁体   中英

drupal search for a specific content type along with its node type for comments

I have a content type called 'ticket'; its Node type for comments is 'interaction'.

I want a search interface which searches through only these two (ticket,interaction) content-types; and output the node-link/title

Also, even though matches are found in interactions, i should be displaying the respective ticket node-link/title. (since interaction are actually the comments for the ticket node)

Can anybody please help me achieve this?

Thanks!

You should try using the Views module in conjunction with the core search module. You can create a view, filter the content type to ticket, and then add an exposed "Search: Search Terms" filter to your view.

Of course you could also write a quick custom module and do your own query.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM