Conditional Content

Joomla search shows articles' titles that contain hidden text

1 year 3 months ago #73177

Tom Kayser's Avatar Tom Kayser

Let me tell you first that I am very satisfied how Conditional Content works. A lot of options and it is very easily to be configured.

What I did not yet find out: when Joomla search is used with terms which are part of the restricted content, the title of the article is listed. OK, nobody will see the matching part of the content, but how can I prevent from showing the title of the article?

Thank you, Tom

1 year 3 months ago #73180

Peter van Westen's Avatar Peter van Westen Admin

You can't, as the Joomla search is stupid. It searches directly in the database on the source content. So not on the final content after plugins have had a go at it.

You can try the Smart Search for better results.

1 year 3 months ago #73186

Tom Kayser's Avatar Tom Kayser

I don't think Joomla site search is that stupid.

At least it won't show results of articles to users without required access level. Not even the title of these articles is displayed.

I wish you could mention this issue in the plugins' FAQ or in its documentation, as it allows unauthorized users to check for hidden content.

1 year 3 months ago #73223

Tom Kayser's Avatar Tom Kayser

I now found out a way to avoid the problem, but it is lengthy and uncomfortable:

1. Put all the text that you want to hide into a custom HTML module and apply CC-tags there. Don't select an existing module position of your template, but create a new position instead, for example 'hide-me'.

2. Take an article where you want to show the conditional content and insert {loadposition hide-me}.

Joomla site search will not show anything of your hidden text, neither the content of the module nor the title of the article.

Tom

1 year 3 months ago #73227

Peter van Westen's Avatar Peter van Westen Admin

Yep, but the issue is the Joomla Search in general. Not Conditional Content.