changed navigation to .html
[nyc.indymedia.org.git] / etc / producer / producers.xml
index 026a40d..5457f87 100755 (executable)
         </Enumerate>
 
 
-             <List key="topics" table="topic t"
-               selection="ctx.content_id = ${article.id} AND ctx.topic_id = t.id" />
-
+             <List key="topics" table="topic t" extratables="content_x_topic ctx"
+               selection="ctx.content_id = ${article.id} AND ctx.topic_id = t.id"  />
+                  <If condition="utility.listSize(topics) > 0">
+                  <then>
+                       <Log message="I have a topic list with ${utility.listSize(topics)}" />
+                   </then>
+                  </If>
         <If condition="article.is_published == '1'">
           <then>
             <Language>
       <Language>
         <Generate 
             generator="/navigation.template" 
-            destination="${config.storageRoot}/${pathprefix}/navigation.inc"/>
+            destination="${config.storageRoot}/${pathprefix}/navigation.html"/>
       </Language>
     </body>
   </producer>
        <Set key="counter" value="1"/>
        
        <Enumerate key="category" table="topic t" extratables="topic t2"
-               selection="t.id=t2.id AND t.archiv_url = 'Category' AND (SELECT count(*) from content_x_topic where topic_id = t.id) > 0" order="RANDOM()" limit="20">
+               selection="t.id=t2.id AND t.archiv_url = 'Subcategory' AND (SELECT count(*) from content_x_topic where topic_id = t.id) > 0" order="RANDOM()" limit="10">
        
         <Log message="Getting Last 5 articles for category: ${category.title} - counter: ${counter}" />
         <Define key="topictitle" value="${category.title}" />
-        
+        <Define key="topicfile" value="${category.filename}" /> 
         
         <List key="randomarticles" table="content"
                selection ="id in (select content_id from content_x_topic where topic_id = ${category.id})" order="date DESC"
-               limit="1" />
+               limit="3" />
         <Language>     
                <Generate
                        generator="/randomcategory.template"
     </body>
   </producer>
 
+  <producer name="footer">
+    <verbs>
+      <verb name="generate" default="1" description="generates the default footer"/>
+    </verbs>
+    <body>
+      <Language>
+        <Generate
+            generator="/footer.template"
+            destination="${config.storageRoot}/${pathprefix}/footer.inc"/>
+      </Language>
+    </body>
+  </producer>
 
   
 </producers>