Developer forum

Forum » Templates » How to search in both content and extranet users

How to search in both content and extranet users

Lise T. Pedersen
Reply

I would like to search both the content of the page AND the extranet-users, shown as employees in frontend, from the same search-field.

Have been told that it can be done some way on template level ... but I have no idea of where to start. I wonder if someone "out there" has experimented with this "problem" before, and is able to help?

/LTP


Replies

 
Morten Bengtson
Reply

You can probably use javascript or some other hack, but here is a simple alternative...

  1. Create a user custom field (checkbox) that you can use to mark which users should appear in search results (exclude admin users etc. from search results).
  2. Create a new "dummy" module and configure the module search settings to make it possible to search for users in the standard "search, weighted" module (use the custom field from step 1 as the "Active" field).
  3. Setup the search module and make sure the "dummy" module is included and configured - point it to a paragraph with the Extranet module, where the details can be displayed.

See the attached screen shots for details.

module.png module_search.png search_users.png search_users_configuration.png user_custom_field.png

 

You must be logged in to post in the forum