Skip to Content Skip to Menu

Auto Actions - new article

  • AlanJones
  • AlanJones
  • ONLINE
  • Posts: 547
  • Thanks: 46
  • Karma: 3
5 days 15 hours ago #343148 by AlanJones
Auto Actions - new article was created by AlanJones
Could you let me know how to add an auto action for email notification when I add a new article in certain categories?

Own Your Own Community!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 50113
  • Thanks: 8576
  • Karma: 1468
3 days 23 hours ago #343155 by krileon
Replied by krileon on topic Auto Actions - new article
Sure, that would rely on a Joomla content event. You can find more information about Joomla content events below.

manual.joomla.org/docs/next/building-extensions/plugins/plugin-events/content/

Specifically you'll be using onContentAfterSave and to use a Joomla event in CB Auto Actions you'll need to prefix it with joomla_ giving joomla_onContentAfterSave. Since these are filtered by context you'll need an article context with is com_content.article. Below is the details for the onContentAfterSave event and what variables it contains.

manual.joomla.org/docs/next/building-extensions/plugins/plugin-events/content/#oncontentaftersave

This can all be put together using the below example.

Global
Triggers: joomla_onContentAfterSave
Type: Email
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var1]
Operator: Equal To
Value: com_content.article
Condition 2
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: 1
Condition 3
Field: Custom > Value
Custom Value: [var2_catid]
Operator: Equal To
Value: CATEGORY_ID_HERE

Replace CATEGORY_ID_HERE with the id of the category you want this applying to. You can use an "In" condition to supply a comma list of category ids as well if you need more than 1 category. It should only apply to newly created articles due to the var3 ($isNew) check. Next just configure the rest of the email however you like.


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.

  • AlanJones
  • AlanJones
  • ONLINE
  • Posts: 547
  • Thanks: 46
  • Karma: 3
1 day 18 hours ago #343200 by AlanJones
Replied by AlanJones on topic Auto Actions - new article
Thank you! I will give that a go.

Own Your Own Community!

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

Moderators: beatnantkrileon
Powered by Kunena Forum