Conditions for Auto Action

11 months 3 weeks ago - 11 months 3 weeks ago #304741 by wbuk
Quick question. We are trying to redirect users away from certain Groupjive categories using Auto Action but unsure about the value used for conditions. How do we specify which category displayed that is being triggered? Example below using Category with ID 2. Tried [var1_id], [var2_id], but it doesn't seem to work.

Trigger: gj_onBeforeDisplayCategory
Type: Redirect
Access: Everybody

Value: ???
Operator: Equal To
Value: 2

Is there documentation that lists what value to put as conditions for all the different triggers? One of the older thread points to the post "Using CB Triggers" ( link ), however we struggle to make any sense on how that is used to determine the condition values.
11 months 3 weeks ago #304750 by krileon
The variables for that trigger are as follows.

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

var1 is the return output (typically used to add extra HTML to the page), var2 is the groups in the category, var3 is the category object it self, var4 is used to add to the counter output in the canvas header, var5 is the current user object viewing the category (not exactly needed anymore). So if you want to condition against the category id you'd use [var3_id].

That trigger is listed on our triggers documentation page below. Use your browsers built in search functionality to search for a trigger, which shows the variables available to it.

Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
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 EST to 4:00 PM EST. 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: wbuk
Moderators: beatnantkrileon
Time to create page: 0.496 seconds
Facebook Twitter Google LinkedIn