<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: XML Extensions with conditions in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320407#M7408</link>
    <description>&lt;P&gt;Ok seems it,  I'll add a filter with an EL Expression condition... thanx&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2013 16:08:22 GMT</pubDate>
    <dc:creator>Guian_</dc:creator>
    <dc:date>2013-11-27T16:08:22Z</dc:date>
    <item>
      <title>XML Extensions with conditions</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320405#M7406</link>
      <description>&lt;P&gt;Hi guys!&lt;/P&gt;
&lt;P&gt;I would like to apply an XML Extension only for a particular path.&lt;/P&gt;
&lt;P&gt;Let's say I want to remote the notification tab in the administration panel for each folders inside :
/default-domain/worspaces/myWorkspace/aSpecialFolder/&lt;/P&gt;
&lt;P&gt;So I'm using this Extension :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions"&amp;gt;
        &amp;lt;action id="TAB_MANAGE_SUBSCRIPTIONS" enabled="false"/&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it removes the subscription tab for any folder in my nuxeo instance.
How can I use it only on a particular path ?
(  a "path start with" condition would be perfect )&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EDIT :&lt;/STRONG&gt;&lt;BR /&gt; /&amp;gt;
as guillaume suggested, I've tried to add a filter node in my action so I can enable it according to the current document path like this :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="actions"&amp;gt;
  &amp;lt;action id="TAB_MANAGE_SUBSCRIPTIONS" &amp;gt;
      &amp;lt;filter id="TAB_MANAGE_SUBSCRIPTIONS"&amp;gt;
        &amp;lt;rule grant="true"&amp;gt;
          &amp;lt;condition&amp;gt;#{!currentDocument.getPathAsString().startsWith("/default-domain/worspaces/myWorkspace/aSpecialFolder/")}&amp;lt;/condition&amp;gt;
        &amp;lt;/rule&amp;gt;
      &amp;lt;/filter&amp;gt;
  &amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it doesn't seem to work,  I'll keep testing but just in case, can you see where I did wrong ?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 15:52:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320405#M7406</guid>
      <dc:creator>Guian_</dc:creator>
      <dc:date>2013-11-27T15:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extensions with conditions</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320406#M7407</link>
      <description>&lt;P&gt;Please read about action and filters on &lt;A href="http://doc.nuxeo.com/x/EYAO"&gt;User Actions (Links, Buttons, Icons, Tabs)&lt;/A&gt;. Check the &lt;EM&gt;Managing Filters to Control an Action Visibility&lt;/EM&gt; section.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 15:58:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320406#M7407</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2013-11-27T15:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extensions with conditions</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320407#M7408</link>
      <description>&lt;P&gt;Ok seems it,  I'll add a filter with an EL Expression condition... thanx&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 16:08:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320407#M7408</guid>
      <dc:creator>Guian_</dc:creator>
      <dc:date>2013-11-27T16:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extensions with conditions</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320408#M7409</link>
      <description>&lt;P&gt;I've  updated my question with my last try to apply filter on my action&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 16:27:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320408#M7409</guid>
      <dc:creator>Guian_</dc:creator>
      <dc:date>2013-11-27T16:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: XML Extensions with conditions</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320409#M7410</link>
      <description>&lt;P&gt;Ok  it works now with :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="actions"&amp;gt;
  &amp;lt;action id="TAB_MANAGE_SUBSCRIPTIONS" &amp;gt;
      &amp;lt;filter id="TAB_MANAGE_SUBSCRIPTIONS"&amp;gt;
        &amp;lt;rule grant="false"&amp;gt;
          &amp;lt;condition&amp;gt;#{currentDocument.getPathAsString().startsWith("/default-domain/worspaces/myWorkspace/aSpecialFolder/")}&amp;lt;/condition&amp;gt;
        &amp;lt;/rule&amp;gt;
      &amp;lt;/filter&amp;gt;
  &amp;lt;/action&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I guess there was no sens to enable it only outside of a folder since its enabled by default so I Disabled it inside of the target folder and it works fine !&lt;/P&gt;
&lt;P&gt;thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2013 16:44:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/xml-extensions-with-conditions/m-p/320409#M7410</guid>
      <dc:creator>Guian_</dc:creator>
      <dc:date>2013-11-27T16:44:47Z</dc:date>
    </item>
  </channel>
</rss>

