Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

CB IF Statement (Hidden Content Showing In Search Result Preview)

  • xengent
  • xengent
  • OFFLINE
  • Posts: 54
  • Thanks: 2
  • Karma: 0
8 years 11 months ago #273848 by xengent
I'm using a CB IF statement code to show content to a specific group only on the site. This code is being placed on another component's articles (Freestyle Joomla FAQs). Works great, however, the content that is supposed to be hidden is shown in the Joomla search results' preview.

Here is the code:
Code:
{cb} [cb:if gids includes "11"] Insert staff notes here. [/cb:if] {/cb}
Does the Joomla default search respect CB IF statements that are hiding/showing content based on the GID? I'm guessing not. So is there a workaround?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #273852 by krileon
I don't think Joomla search passes its content through Joomla content plugins. If it does then it may have a parameter in its search plugin within Extensions > Plugins.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • xengent
  • xengent
  • OFFLINE
  • Posts: 54
  • Thanks: 2
  • Karma: 0
8 years 11 months ago #273853 by xengent
I'm lost on this. Which plugin am I looking for?

If it's not possible, is there a workaround? Can I target the CB IF statement via CSS somehow (as a selector)? I'd be ok with hiding it in CSS only. I can't have users enter/paste a CSS class via the WYSIWYG unfortunately

Please Log in or Create an account to join the conversation.

  • xengent
  • xengent
  • OFFLINE
  • Posts: 54
  • Thanks: 2
  • Karma: 0
8 years 11 months ago #273858 by xengent
I guess the CSS wont work within the search results content.

Please let me know if there is a workaround for this. Thanks.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #273899 by krileon
The Joomla search plugin is "Search - Content". It does not pass the contents of the article through content prepare. This means the CB Content Bot and any other content plugin will not apply to the search results.

This has nothing to do with CB, but a feature lacking in Joomla it self; I recommend posting on Joomla forums to request the feature or review implementing content prepare for search results directly in the content search plugin below.

plugins/search/content/content.php


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum