From: fh Date: Sun, 7 Oct 2001 00:04:25 +0000 (+0000) Subject: added linksImcs feature X-Git-Tag: prexmlproducerconfig~360 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=cb0f6400ac10a4328272a61a0733d5a4123359c2;p=mir.git added linksImcs feature --- diff --git a/source/mircoders/producer/ProducerStartPage.java b/source/mircoders/producer/ProducerStartPage.java index 534c5144..d5aae414 100755 --- a/source/mircoders/producer/ProducerStartPage.java +++ b/source/mircoders/producer/ProducerStartPage.java @@ -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