added topics list to article generation
authormtopper <mtopper>
Thu, 28 Jul 2005 01:04:13 +0000 (01:04 +0000)
committermtopper <mtopper>
Thu, 28 Jul 2005 01:04:13 +0000 (01:04 +0000)
etc/producer/article.template
etc/producer/producers.xml

index 5e328bf..99c43df 100755 (executable)
@@ -153,6 +153,10 @@ this is a draft<br />
    ${article.description_parsed}
 </p>
 
+               <list topics as t>
+                       <p>${t.title} | </p>
+               </list>
+
         <if article.to_original.mediacount!=0>
           <!-- media -->
           <list article.to_original.to_media_audio as media>
index 430d58d..026a40d 100755 (executable)
             
            <GenerateMedia key="media" />
         </Enumerate>
+        
+      
         <Enumerate 
             key="media" table="otherMedia" 
             selection="exists (select * from content_x_media where media_id=other_media.id and content_id=${article.id})
            <GenerateMedia key="media" />
         </Enumerate>
 
+
+             <List key="topics" table="topic t"
+               selection="ctx.content_id = ${article.id} AND ctx.topic_id = t.id" />
+
         <If condition="article.is_published == '1'">
           <then>
             <Language>
         <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" />
-               
+        <Language>     
                <Generate
                        generator="/randomcategory.template"
                        destination="${config.storageRoot}/fpincludes/random${counter}.inc" />        
-      
+       </Language>
         
         <Set key="counter" value="counter+1" />
     </Enumerate>