cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling/Hiding default folder creation options in Create... menu in document library

hiten_rastogi1
Star Contributor
Star Contributor
Hi Folks,

Is there a way to disable/hide default folder creation options in Create… menu under Document Library ?? The requirement here is to have a custom folder option rather than default one. I am not able to find a way to do this. Please help

Thanks
10 REPLIES 10

muralidharand
Star Contributor
Star Contributor
Yes, we can customise it.
The existing settings are present in,
share-documentlibrary-config.xml
file.
You need to remove the below part.

<content id="folder" label="create-content.folder" icon="folder" index="5" type="javascript">
            <param name="function">onNewFolder</param>
         </content>


You need to place the attached file in the web-extension folder.

Thanks for your reply. I will try it out.

Want to clarify with you something. I read somewhere on the forum which I am not very clear about, it was written that for this purpose we should create an extension module disabling the onNewFolder funcion. I was not able to understand how to do that but your solution looks pretty straightforward where you override out-of-the-box with your custom one rather than going through the extension way. Which is the correct way ?? Please help me understand.

Again thanks a lot for taking time out and replying.

muralidharand
Star Contributor
Star Contributor
I believe you're referring the below URL for the module extensions.
http://docs.alfresco.com/4.0/tasks/Create-a-Model.html
http://docs.alfresco.com/4.2/concepts/dev-extensions-share-module-deployment.html
I have used module extension for extending / overriding alfresco Share OOTB webscripts.


For your requirement, you can use this approach. If I found module extension approach, I will share here.

Hi Murali,

I tried your solution but it is not working. I placed the file under web-extension folder and named it share-documentlibrary-config.xml and commented out the onNewFolder content tag but I am still able to see the Folder creation option in Create… menu. Should the file be placed under <strong>web-extension –> extension</strong> folder and is the file name share-config-custom.xml as provided by you in attachment or the one that I have provided ??

muralidharand
Star Contributor
Star Contributor
Hi,
The file name should be
 share-config-custom.xml
under web-extension directory.

Hi Murali,

I tried your solution again but it's still not working. I saw one strange thing though, in the Create… menu all the options(other than the default folder option) got doubled, like xml file option, html file option.

muralidharand
Star Contributor
Star Contributor
Sorry, I missed one thing.
 replace="true"
. At this attribute in the
share-custom-config.xml
file, refer attached.

<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
….
……
</config>

Hi Murali,

The solution is working perfectly. Thanks a lot. I would like to ask some question around this, it will be great if you can provide me with the answers/link to them.

1. Why the file name is chosen as share-custom-config.xml. It is confusing as I have same file for my custom types under META-INF.
2. I copied the code in my META-INF/share-custom-config.xml rather than web-extension/share-custom-config.xml and it worked the same way. Which is the appropriate way ??
3. It's a bit too much Smiley Happy… but can you give me a high level view on how the folder creation option is working. I am reading blogs and documentation simultaneously but it would be great if you just provide the high-level description.

muralidharand
Star Contributor
Star Contributor
If you want to customise the Alfresco share then you need to place the files under web-extension.
Please look at the below link, then you will understand, why I have used, share-config-custom.xml
http://docs.alfresco.com/5.0/concepts/dev-extensions-share-configuration.html


To learn more about, Alfresco share customisation, please refer the below links.
http://docs.alfresco.com/5.0/concepts/dev-for-developers.html
http://docs.alfresco.com/5.0/concepts/dev-extensions-share-extension-points-introduction.html
http://ecmarchitect.com/archives/tag/alfresco-share-customization
http://ezref.info/Step+by+Step+guide+to+Customize+Alfresco+Share+layout+dashlets+pages+and+document+...