added linksImcs feature
authorfh <fh>
Sun, 7 Oct 2001 00:04:25 +0000 (00:04 +0000)
committerfh <fh>
Sun, 7 Oct 2001 00:04:25 +0000 (00:04 +0000)
source/mircoders/producer/ProducerStartPage.java

index 534c514..d5aae41 100755 (executable)
@@ -86,6 +86,13 @@ public class ProducerStartPage extends Producer {
     entityList = topicsModule.getByWhereClause("","title",-1);
     SimpleList topicList = HTMLTemplateProcessor.makeSimpleList(entityList);
 
+    // get the imclinks
+    entityList = linksImcsModule.getByWhereClause("", "sortpriority, title", -1);
+    SimpleList imcList = HTMLTemplateProcessor.makeSimpleList(entityList);
+
+    EntityList theParentList = linksImcsModule.getByWhereClause("to_parent_id=NULL", "sortpriority, title", -1);
+    SimpleList parentList = HTMLTemplateProcessor.makeSimpleList(theParentList);
+
     // get the newswire
     whereClause="is_published=true AND to_article_type >= 1";
     entityList = contentModule.getContent(whereClause,"date desc, webdb_create desc",0,newsPerPage);
@@ -112,7 +119,7 @@ public class ProducerStartPage extends Producer {
                * pick the biggest one. or is there
                * another way around this that I am missing?
                * can we make getIdasInt() or can we just have
-               * another getId() that returns an Int and the VM 
+               * another getId() that returns an Int and the VM
                * will handle it transparantly? -mh
                */
               try {
@@ -149,7 +156,7 @@ public class ProducerStartPage extends Producer {
         tinyIcon = MirConfig.getProp("Producer.Icon.TinyText");
         iconAlt = "Text";
       }
-        
+
       try{
         //mediaList = HTMLTemplateProcessor.makeSimpleList(upMediaEntityList);
         contentHash = (SimpleHash)newsWireList.get(i);
@@ -224,7 +231,7 @@ public class ProducerStartPage extends Producer {
     } //enf for featurueList.size..
 
 
-    
+
     /*for (int i=0; i < entityList.size();i++) {
       currentContent = (EntityContent)entityList.elementAt(i);
       //fetching/setting the images
@@ -325,12 +332,14 @@ public class ProducerStartPage extends Producer {
     startPageModel = new SimpleHash();
     startPageModel.put("breakingnews", breakingList);
     startPageModel.put("topics", topicList);
+    startPageModel.put("imclist", imcList);
+    startPageModel.put("parentlist", parentList);
     startPageModel.put("newswire", newsWireList);
     startPageModel.put("startspecial", startItemList);
     startPageModel.put("features", featureList);
 
     htmlFileName = producerDocRoot + "/index.shtml";
-    
+
     produce(startPageTemplate, htmlFileName, startPageModel, htmlout);
 
     // Finish