cancel
Showing results for 
Search instead for 
Did you mean: 

Extend documentlist_v2.lib.ftl template

netfisher777
Champ in-the-making
Champ in-the-making
Hi everyone!

I'm developing share amp module and need to hide some menu items from options popup menu in the right corner of documentlist component.

I'm trying to extend documentlist_v2.lib.ftl template, but it's not working:

src/main/amp/config/alfresco/web-extension/site-webscripts/com/somepackage/components/documentlibrary/include/documentlist_v2.lib.ftl:


<@markup target="documentListViewRssAction" action="remove" />


src/main/amp/config/alfresco/web-extension/site-data/extensions/interface-cut-plugin-extension-modules.xml:


<extension>
<modules>
    <module>
        <id>Remove Document Library Options menu items</id>
        <auto-deploy>true</auto-deploy>
        <customizations>
            <customization>
                <targetPackageRoot>org.alfresco.components.documentlibrary.include</targetPackageRoot>
                <sourcePackageRoot>com.somepackage.components.documentlibrary.include</sourcePackageRoot>
            </customization>
        </customizations>
    </module>
</extension>


What's wrong with this? May be documentlist_v2.lib.ftl need to be located at another package?
2 REPLIES 2

ddraper
World-Class Innovator
World-Class Innovator
You can't actually extend a lib file, you need to extend the .get.js file that is including that lib file.

netfisher777
Champ in-the-making
Champ in-the-making
In .get.js files i can overwrite model objects and so on before it will be applied to the template as i understand. But template doesn't contain any condition to render that action or not.
in documentlist_v2.lib.ftl we have:

<@markup id="documentListViewRssAction">
  <li class="drop-down-list-break-below"><a href="#"><span class="rss">${msg("link.rss-feed")}</span></a></li>
</@>

Can you give me some example on how i can remove "documentListViewRssAction" using your method?
As a temporary solution I had overwrote whole template in my amp and it worked. But it's wrong solution.