\r\n```\r\nThis will hide the document-create-button on the following pages in WebUI:\r\n* Home Page\r\n* Search Page\r\n* Any doctypes that do not have the Folderish facet\r\n* Doctypes that have the Collection facet\r\n\r\nThe goal we had was to hide the button on any page that could not directly have documents created in it. This code satisfies those conditions.\r\n", "htmlContent" : "

Posting a solution, in case anyone also would like to do this. Support came up with a script that I modified slightly and it seems to be working well so far (at least in development). Add the following code in your custom-bundle:

\n
<script>\n  const app = document.querySelector('nuxeo-app');\n  app.$.pages.addEventListener('iron-select', () => { \n    app.root.querySelector('nuxeo-document-create-button').hidden = (app.page === 'home') || (app.page === 'search') ? true : app.currentDocument && (!app.currentDocument.facets.includes('Folderish') || app.currentDocument.facets.includes('Collection')); \n  });\n</script>\n
\n

This will hide the document-create-button on the following pages in WebUI:

\n \n

The goal we had was to hide the button on any page that could not directly have documents created in it. This code satisfies those conditions.

" } ] }; Versioning.getActiveVersion = function() { var versions = this.versions; for (var i=0,len=versions.length;i

Select a revision to compare with:
Side by side diff