0

I have to make some changes on the article edition workflow to add some features in the middle of the current edition process.

I mean, the articles when published must be saved in a different status, and will be approved by the admin before being published. Also if an author edits the article, I must keep the original article published and the new version will be in pending status until it is approved and the original article is updated. I was thinking of duplicating the article programmatically to suit this task.

I was wondering, what do I have to override, if I have to change the article edition component (is it com_content?), or what do you suggest that I do?

1 Answer 1

1

I think that you will need a custom component and a plugin:

  • the plugin will change the state of new articles to unpublished. onContentBeforeSave event will help you with that. More details about the content events can be found here.
  • the component will list new versions of articles. You will need some kind of task there to accept a new version and update the original article.

Another way you can try instead of plugin is to set up the permissions and disable "Edit State".

6
  • First thing I have to do is override the com_content admin component, in a way that when I open the article for edition, I'll be able to load its content in memory. Any idead of how do I do that?
    – rogcg
    Commented Apr 15, 2015 at 14:48
  • You cannot override it that way. You can override only layouts, but you will need more logic. So I advice you to write your own simple component to manage articles that way. Commented Apr 15, 2015 at 19:01
  • Look at this question I've made, and the solution. Is it the best way? joomla.stackexchange.com/questions/9480/…
    – rogcg
    Commented Apr 15, 2015 at 19:04
  • Honestly I am not a fun of overriding. As a developer I am preferring to code custom solutions. Commented Apr 15, 2015 at 19:05
  • 1
    Just a note - I am talking about the site part, because in the administrator com_content does not fire any events. When a user opens the article for edition it would be onContentPrepare. Commented Apr 16, 2015 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.