From: john Date: Sat, 13 Oct 2001 10:56:39 +0000 (+0000) Subject: small fix for searching by media type. added MediaType.getvalue(classname) to the... X-Git-Tag: prexmlproducerconfig~342 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=2498dd5987f0820b6ddf1ec63ef27f1664f372a4;p=mir.git small fix for searching by media type. added MediaType.getvalue(classname) to the freemarker hash for content as variable "type". this gets picked up by the content template to include a meta keyword tag of the form ImageJpeg. tied into htdig, this gives you a way to return pages with certain media types. --- diff --git a/source/mircoders/producer/ProducerContent.java b/source/mircoders/producer/ProducerContent.java index abfd9115..ae7b36aa 100755 --- a/source/mircoders/producer/ProducerContent.java +++ b/source/mircoders/producer/ProducerContent.java @@ -171,6 +171,7 @@ public class ProducerContent extends Producer { theLog.printError("ProducerStartpage:problem in reflection: "+mediaHandlerName); } //end catch upMediaSimpleHash.put("url", mediaHandler.getURL(upMedia, mediaType)); + upMediaSimpleHash.put("type",mediaType.getValue("classname")); mediaList.add(upMediaSimpleHash); } //end if media_type != null } //end for diff --git a/templates-dist/producer/content.template b/templates-dist/producer/content.template index c01372b7..d18c8ff8 100755 --- a/templates-dist/producer/content.template +++ b/templates-dist/producer/content.template @@ -3,6 +3,9 @@ mir.indymedia.de: ${title} + + +