src/ztfy/utils/catalog/configure.zcml
branchZTK-1.1
changeset 250 16a535e0eb92
parent 228 87a929e63afe
--- a/src/ztfy/utils/catalog/configure.zcml	Wed May 07 19:04:14 2014 +0200
+++ b/src/ztfy/utils/catalog/configure.zcml	Sat May 10 11:15:34 2014 +0200
@@ -1,16 +1,19 @@
 <configure
 	xmlns="http://namespaces.zope.org/zope"
+	xmlns:zcml="http://namespaces.zope.org/zcml"
 	i18n_domain="ztfy.utils">
 
-	<class class=".index.TextIndexNG">
-		<require
-			interface="zope.catalog.interfaces.IAttributeIndex
-					   zope.index.interfaces.IStatistics"
-			set_schema="zope.catalog.interfaces.IAttributeIndex"
-			permission="zope.ManageServices" />
-		<require
-			interface="zope.index.interfaces.IIndexSearch"
-			permission="zope.View" />
-	</class>
+	<configure zcml:condition="installed zopyx.txng3.core">
+		<class class=".index.TextIndexNG">
+			<require
+				interface="zope.catalog.interfaces.IAttributeIndex
+						   zope.index.interfaces.IStatistics"
+				set_schema="zope.catalog.interfaces.IAttributeIndex"
+				permission="zope.ManageServices" />
+			<require
+				interface="zope.index.interfaces.IIndexSearch"
+				permission="zope.View" />
+		</class>
+	</configure>
 
 </configure>