0

I have to make some changes on the article edition worflow, to add some features in the middle of the current edition proccess.

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 edit the article, I must keep the original article published and the new version will be in a pending status until it is approved and the original article is updated. I was thinking in duplicating the article programatically to make 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 me to do?

Thanks in advance.

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".

  • 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 Apr 15 '15 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. – Dmitry Rekun Apr 15 '15 at 19:01
  • Look at this question I've made, and the solution. Is it the best way? joomla.stackexchange.com/questions/9480/… – rogcg Apr 15 '15 at 19:04
  • Honestly I am not a fun of overriding. As a developer I am preferring to code custom solutions. – Dmitry Rekun Apr 15 '15 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. – Dmitry Rekun Apr 16 '15 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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