Make Workspace orderable

Hello,

I wish I could change the order of the folders into my Workspace

==> How could I make the Workspaces orderable with Studio ? (make the button “Déplacer vers le bas”, “Déplacer vers le haut”… appear)

Thank you

0 votes

1 answers

1751 views

ANSWER



Ordered (or Orderable) Folder is just a different kind of Folder http://doc.nuxeo.com/display/USERDOC/Folders

Just click on the [New document] button and select “Ordered folder” type

For the Workspace doctype I think you have to add the Orderable facet I don't know how to do this in Studio, but with code it's something like :

<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
<doctype name="Workspace" extends="Document">
  ...
  <facet name="Orderable"/>
  ...
</doctype>
</extension>

I think the [Move up] and [Move down] buttons will appear (they are probably managed by a filter based on the Orderable facet)

Hope it helps

0 votes



hello, Thank you for your answer. I tried to apply it in Studio with the code :

<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">

&lt;doctype name=&quot;Workspace&quot; extends=&quot;Folder&quot;&gt;

  &lt;facet name=&quot;Orderable&quot;/&gt;

&lt;/doctype&gt;

</extension>

But it doesn't work :(

If you have any other idea… thank you

10/11/2013

maybe this can help you https://github.com/nuxeo/nuxeo-core/blob/master/nuxeo-core/src/main/resources/OSGI-INF/CoreExtensions.xml

see how the OrderedFolder is defined

in your case: it seems you don't want a new "Ordered Folder" doc type but override the default Workspace doc type so you have to override the default contribution for the Workspace doc type

maybe this doesn't support the "fusion" and you have to entirely redefine the Workspace doc type (note the "…" in my first answer)

10/11/2013