Hi,
Just as a foreword, I am a complete noob to EE development. I am trying to develop an entry-cloning module using the after_channel_entry_save hook and the Channel Entries API to duplicate the metadata and custom fields. Currently the extension does what I want it to do, only it fires on every channel entry. Ideally I’d be able to wrap all the code in my hook method in a conditional to check a yes_no which determines whether or not to clone this entry. Having this in plain sight on the publish page would be my ideal goal, though I realise it is like unachievable.
I am currently trying to achieve this effect by packaging a module with the extension and using a tab to update the $settings array and update/insert the db, however I’m probably going to have to use the after_channel_entry_save hook in my tab save method, meaning the database won’t be updated before the conditional evaluates false and nothing happens.
Would there be an easier way to develop some sort of flag for this rather than packaging a whole module with the extension just for tab functionality?
Thanks
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.