Alfresco, how to hide categories component from Share app

Every Surf component in a Share page can be extended in order to perform customisations on it.

To identify the target component, enable SurfBug …

… and navigate to the page to identify the component by clicking on it.

Having this component details in mind, you can write a simple surf customisation at /opt/alfresco/tomcat/shared/classes/alfresco/web-extension/site-data/extensions/remove-categories-extension.xml

<extension>
    <modules>
        <module>
            <id>Remove categories from share</id>
            <version>1.0</version>
            <auto-deploy>true</auto-deploy>
            <components>
                <component>
                    <region-id>categories</region-id>
                    <source-id>repository</source-id>
                    <scope>template</scope>
                    <sub-components>
                        <sub-component id="default">
                            <evaluations>
                                <evaluation id="guaranteedToHide">
                                    <render>false</render>
                                </evaluation>
                            </evaluations>
                        </sub-component>
                    </sub-components>
                </component>
            </components>
        </module>
    </modules>
</extension>

After restarting Alfresco, categories tab will disappear from Repository view page for every user. If you want to apply this configuration also for document library, just replace

<source-id>repository</source-id>

by

<source-id>documentlibrary</source-id>

at /opt/alfresco/tomcat/shared/classes/alfresco/web-extension/site-data/extensions/remove-categories-extension.xml or create a new component entry in this XML file to hide categories on both pages.

Remember to include all your customisations under /opt/alfresco/tomcat/shared directory in order to avoid maintenance and upgrading conflicts.

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s