CMS Development

akondratyuk
Membro

Search results should show and hide private content based on access

resolver

For example, private or protected blog posts should only display in search results if the user searching has access to them—otherwise those posts should be hidden. 

 

I'd like to avoid the experience of person B seeing content that is private to person A. 

 

The best current idea is to add something to the title of posts meant for person A and then filter before displaying results. 

 

 

0 Avaliação positiva
1 Solução aceita
stefen
Solução
Conselheiro(a) de destaque | Parceiro
Conselheiro(a) de destaque | Parceiro

Search results should show and hide private content based on access

resolver

@dennisedson @akondratyuk one of the easiest ways to exclude entire sections of a website is using the `pathPrefix` and `matchPrefix` parameters. The catch is it requires that your page URLs are structured in a particular way.

If the content for Person A was all under a single parent URL like `/person-a/child-pages`, then you can exclude those results when Person B is searching by adding `&pathPrefix=/person-a&matchPrefix=False` to the site search query.

Stefen Phelps, Community Champion, Kelp Web Developer

Exibir solução no post original

2 Respostas 2
stefen
Solução
Conselheiro(a) de destaque | Parceiro
Conselheiro(a) de destaque | Parceiro

Search results should show and hide private content based on access

resolver

@dennisedson @akondratyuk one of the easiest ways to exclude entire sections of a website is using the `pathPrefix` and `matchPrefix` parameters. The catch is it requires that your page URLs are structured in a particular way.

If the content for Person A was all under a single parent URL like `/person-a/child-pages`, then you can exclude those results when Person B is searching by adding `&pathPrefix=/person-a&matchPrefix=False` to the site search query.

Stefen Phelps, Community Champion, Kelp Web Developer
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Search results should show and hide private content based on access

resolver

@stefen , any advice you can offer?

0 Avaliação positiva