![]() ![]() If you want to execute your code only for one specific view, get the current view path into $token variable and compare it with your view path as given in the following code. Send mail, which is extremely basic (after the work completed in the loop above. ![]() When the send mail action is directly nested in the loop in the reaction rule, the variable is available as a token to use for the TO address of the email. However, this has removed the item from the actual node field. In Rules, all context variables that require text input use the 'string' datatype, as that is the only thing provided by core Drupal for text input. The problem is that since i have this variable is in place, any time i click on edit / save for any action/condition i always get the below notice. I added an action to the loop-before the send mail action-which will remove item from list. Download & Extend Browse Repository Documentation Modules Themes Distributions Issue queues. For marketers For agencies Case studies About Drupal Drupal 9 In the news Build. If you want to execute your code only once, then use the condition $current=2 inside foreach loop. Problem/Motivation hi i have a view result variable (filtering node by ID token) in place that is been used in action. Would be great to have an action to break the views loop. Sending application/x-www-form-urlencoded POST requests requires that you specify the POST fields as an array in the formparams request options. ![]() ![]() You may already be familiar with creating reaction. In the foreach loop provided in the function, add your custom code. The Rules module is one of the most powerful site building tools in Drupal contrib space besides Views. so that it is no longer considered as one of the Rules Actions to be performed for each iteration of the loop. The special variable context is not sent. When I move Send Email to the left, I cannot access the 'listitem' variable. There are two issues you need to address here: You would need to extend twig in order to create dynamic variables. In views_bulk_operations_execute() function, add the code that you want to execute 'before' executing the rules component. Drupal Answers is a question and answer site for Drupal developers and administrators. As I didn't find any other solution, I hacked the views_bulk_operations.module to accomplish my work. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |