onContentBeforeSave data property

Be informed that this forum is not an official support forum for Joomla! 4.0. Any issues regarding Joomla! 4.0 must be reported at https://issues.joomla.org/.

Joomla! 4.0 is still in its Alpha stage. This forum should be used for sharing information about Joomla! 4.0.

Moderator: ooffick

Post Reply
webjunky
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Mar 20, 2019 9:26 am

onContentBeforeSave data property

Post by webjunky » Wed Mar 20, 2019 9:30 am

The official documentations states:

docs.joomla.org/Plugin/Events/Content#onContentBeforeSave
data The data to save. Note this data should be already validated by the extension. Since 3.7. Required to be set by extensions as of 4.0 as the core joomla content plugin uses this property
I added this property to tehe plugin event, but I wonder how to use this. What is the difference in the property 'article' and 'data'? What was the reason to add this property?

I would like to change meta data before saving the article. How do I properly do this in J4.0?
Last edited by toivo on Wed Mar 20, 2019 10:09 am, edited 1 time in total.
Reason: mod note: fixed quote

erick-b
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Tue Feb 17, 2015 10:25 am

Re: onContentBeforeSave data property

Post by erick-b » Sun Jun 02, 2019 6:48 am

for meta data why dont you use plugins/system/yourPlugin::onBeforeCompileHead() ?


Post Reply

Return to “Joomla! 4 Related”