Wei
  • Member for 4 years, 5 months
  • Last seen more than a week ago
  • Melbourne, Victoria, Australia
EVENT_AFTER_SAVE_ELEMENT triggered twice after saving an entry
Accepted answer
5 votes

After using Andrew's debugging tip, I found out one event was triggered by saving the element itself, and the other was triggered by saving the revision of the element. So I modified my event listener ...

View answer
How do I send an email to multiple recipients?
1 votes

$email->cc = array( array('email' => 'cc1@example.com', 'name' => 'Person One'), // ... ); If you want emails recipients to see other recipients listed in the email, use 'cc'; ...

View answer
Is there a way to clear old database files from storage|backups folder automatically?
1 votes

******* Updated based on khalwat's comment ************ I don't think Craft does that automatically. Not sure about 3rd party plugins. I wrote a custom controller function to run by Cron Job, and it'...

View answer
Loop by column from a table
1 votes

Is this what you're after? {% for row in block.tableHandle %} {% for columnHandle, columnValue in row %} {# If not col1 #} {% if loop.index != 1 %} <p>Do ...

View answer