Automatic publishing system in sections

Good morning, everybody,

I am looking for an automatic publishing system in sections. Explanations: I have a root workspace in which I have several workspaces.

In one of them (which I called “IUT”), I created several sub-workspaces.

In addition, in sections, I have created exactly the same tree structure.

Finally, for each workspace in the tree structure, I have defined the corresponding section as a publication space.

Now, I want when someone deposits a document in the workspace, it is automatically published in the defined field.

Is it possible to do that? If not, is it possible to create a button in the studio to do it?

Thanks !

0 votes

1 answers



Maybe you could have a look at the Document.GetParent operation with type = Workspace

then retrieve its publish:sections field

and finally use one of the publishDocument / Document.PublishToSection / Document.PublishToSections operations

Whether the operation is automatic or initiated by the user does not really make a change : in the first case, your operation will be called by event listener, in the second case, by a user action.

1 votes

Hi !

I have allready tryed this but whithout success.

In studio, when I do :

Fetch > Context.FetchDocument Document > Document.PublishToSection

I have to define a target :

When I use the editor, I have no many options :


You should first retrieve the publish:sections value from the parent workspace and store it in a context variable. Then restore the original document (Push and Pop operations) and use the stored publish:sections value as the target parameter of Document.PublishToSection. Remember that publish:sections is an array.