Skip to Content Skip to Menu

[SOLVED] GJ category meta data

6 years 3 months ago - 6 years 3 months ago #306149 by victoriakim
[SOLVED] GJ category meta data was created by victoriakim
Hi,

Is there a way to put meta tile and meta description to each GJ categories, without creating menu items for those categories?

Thanks.
Last edit: 6 years 3 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 3 months ago #306173 by krileon
Replied by krileon on topic GJ category meta data
You can do that using CB Auto Actions and its Code action. Set Method to Header then supply the necessary HTML to be added to the page head. You'll need to act on the following triggers.

Category:
Code:
$_PLUGINS->trigger( 'gj_onBeforeDisplayCategory', array( &$return, &$rows, &$category, &$counters, $user ) );

Group:
Code:
$_PLUGINS->trigger( 'gj_onBeforeDisplayGroup', array( &$return, &$row, &$users, &$invites, &$counters, &$buttons, &$menu, &$tabs, $user ) );


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.
The following user(s) said Thank You: nant

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

6 years 3 months ago - 6 years 3 months ago #306218 by victoriakim
Replied by victoriakim on topic GJ category meta data
Thanks for the info. I understand the concept but would appreciate further instructions.

1. Can I use different meta datas to different categories? Then how?

2. I guess, I need to put following HTML on Auto Action code field?

<head>
<meta name=.... content.....>
</head>

$_PLUGINS->trigger( 'gj_onBeforeDisplayCategory', array( &$return, &$rows, &$category, &$counters, $user ) );

Is this part of the code that I need to put somewhere?

Thanks.
Last edit: 6 years 3 months ago by victoriakim.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 3 months ago #306227 by krileon
Replied by krileon on topic GJ category meta data
Don't include the head tags, just include your meta tags.

Is this part of the code that I need to put somewhere?

No, I'm just providing you with the trigger and its variables. The trigger you'd select from the dropdown. The variables you can substitute in. For example with gj_onBeforeDisplayCategory the 3rd variable is the category. So to get the category name you'd do [var3_name].


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.

6 years 3 months ago #306249 by victoriakim
Replied by victoriakim on topic GJ category meta data
I set

Triggers to gj_onBeforeDisplayCategory
Type to Code
under Conditions, [var3_name] Equal to Abc Def
Method to Header
Code to <meta name=........>

I display group categories under a menu item ( it's menu item type is Plugin > CB GroupJive > All Categories). I set the auto action listed above, but I see the menu item's metas shown on each group category page.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 3 months ago #306266 by krileon
Replied by krileon on topic GJ category meta data
The menu items meta data will always be loaded. Don't set any meta data in the menu item it self.


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