UnIndexContent producer node now will unindex articles which
authorjohn <john>
Sat, 18 Jan 2003 14:49:27 +0000 (14:49 +0000)
committerjohn <john>
Sat, 18 Jan 2003 14:49:27 +0000 (14:49 +0000)
are is_published=='f'

etc/producer/producers.xml

index e97a160..c1229b8 100755 (executable)
       </verb>
     </verbs>
     <body>
-      <Enumerate key="article" table="content" selection="is_published='t' ${verbcondition}"
+      <Enumerate key="article" table="content" selection="1=1 ${verbcondition}"
                   limit="limit" order="webdb_create desc, date desc">
+        <If condition="article.is_published == '1'">
+         <then>
            <Language>
               <Generate 
-                  generator="/article.template" 
-                  destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.shtml"/>
+                generator="/article.template" 
+                destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.shtml"/>
              <Generate 
-                  generator="/emailThisArticle.template" 
-                  destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.txt"/>
+                generator="/emailThisArticle.template" 
+                destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.txt"/>
              <PDFPreFormat 
-                 key="article" 
-                 numLinesBetweenImages="3" 
-                 charWidthCM="0.19" 
-                 pixelWidthCM="0.035"
-                 contentAreaWidthCM="16" 
-                 lineHeightCM="0.5" />
+               key="article" 
+               numLinesBetweenImages="3" 
+               charWidthCM="0.19" 
+               pixelWidthCM="0.035"
+               contentAreaWidthCM="16" 
+               lineHeightCM="0.5" />
              <Generate 
-                  generator="/printablecontent.template" 
-                  destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.fo"
-                 parameters="UTF-8" />
+                generator="/printablecontent.template" 
+                destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.fo"
+               parameters="UTF-8" />
              <PDFGenerate
-                  generator="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.fo"
-                 destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.pdf"
-                 stylesheet="${config[&quot;Producer.HTML2FOStyleSheet&quot;]}" />
+                generator="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.fo"
+               destination="${config.storageRoot}/${pathprefix}/${article.date.formatted.yyyy}/${article.date.formatted.MM}/${article.id}.pdf"
+               stylesheet="${config[&quot;Producer.HTML2FOStyleSheet&quot;]}" />
             </Language>
             <MarkContent key="article"/>            
-           <IndexContent key="article" pathToIndex="/tmp/index"/>
+           <IndexContent key="article" pathToIndex="${config[&quot;IndexPath&quot;]}"/>
+         </then>
+         <else>
+           <UnIndexContent key="article" pathToIndex="${config[&quot;IndexPath&quot;]}"/>
+         </else>
+       </If>
       </Enumerate>
     </body>
   </producer>