I have made e new dataEditor for handling tags. I know Umbraco comes with one, but I'm not satified with it's functianlity, as I need to delete tags when no nodes uses them.
But the problem is, that the data is stored in the database whenever the node is saved and not when the node is published. This results in tags in the database refering to unpublished nodes.
Is there a way to trigger when the node is published/unpublished directly in the Data Editor?
Is there anything like "base.DataEditorControl.onPublish" and "base.DataEditorControl.onUnPublish"?
I could use the normal eventHandler "Document.BeforePublish", but then I need to iterate the node's properties, to see if it used the dataEditor - not sure if that's even possible - nonetheless that solution seems wrong.
Data Editors and publish/unpublish events?
I have made e new dataEditor for handling tags. I know Umbraco comes with one, but I'm not satified with it's functianlity, as I need to delete tags when no nodes uses them.
But the problem is, that the data is stored in the database whenever the node is saved and not when the node is published. This results in tags in the database refering to unpublished nodes.
Is there a way to trigger when the node is published/unpublished directly in the Data Editor?
Is there anything like "base.DataEditorControl.onPublish" and "base.DataEditorControl.onUnPublish"?
I could use the normal eventHandler "Document.BeforePublish", but then I need to iterate the node's properties, to see if it used the dataEditor - not sure if that's even possible - nonetheless that solution seems wrong.
Just a quick refresh to this post. Hopefully someone has a clever solution ;-)
Hi,
Don't have a complete solution for you, but you need to iterate through the property values to access the tags. There is no event for it.
Cheers,
Richard
Thank you for your reply, Richard.
A bit disapointing, though. Will do it the hard way then ;-)
Cheers,
Dan
is working on a reply...