From 721176418008f2c45773d1aacc9170c994586e60 Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 3 Mar 2011 15:43:36 +0000 Subject: [PATCH] =?UTF-8?q?Allgemeine=20Template=20f=C3=BCr=20ObjectList?= =?UTF-8?q?=20mit=20specializeObjects=20=3D=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@779 8810af33-2d31-482b-a856-94f89814c4df --- .../src/com/arsdigita/aplaws/Loader.java | 19 ++++++++ .../navigation/templates/SpecializingList.jsp | 47 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 ccm-zes-aplaws/web/packages/navigation/templates/SpecializingList.jsp diff --git a/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java b/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java index 9347235d7..53c67b5e3 100644 --- a/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java +++ b/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java @@ -237,6 +237,25 @@ public class Loader extends PackageLoader { "Display a MultiPartArticle as index item", "/packages/navigation/templates/mparticle-index.jsp"); + + template = + Template.create( + "Specializing list", + "Displays a list of items as the ordinary template, but specializes the objects in the list.", + "/packages/navigation/templates/SpecializingList.jsp"); + + template = + Template.create( + "SciProject list", + "Displays a list of SciProject items, including some attributes.", + "/packages/navigation/templates/SciProjectList.jsp"); + + template = + Template.create( + "SciPublication list", + "Displays a list of publication items, including some attributes.", + "/packages/navigation/templates/SciPublicationList.jsp"); + } /** diff --git a/ccm-zes-aplaws/web/packages/navigation/templates/SpecializingList.jsp b/ccm-zes-aplaws/web/packages/navigation/templates/SpecializingList.jsp new file mode 100644 index 000000000..34898c1f9 --- /dev/null +++ b/ccm-zes-aplaws/web/packages/navigation/templates/SpecializingList.jsp @@ -0,0 +1,47 @@ + + + + + + + + + + + long age = Navigation.getConfig().getIndexPageCacheLifetime(); + if (age == 0) { + DispatcherHelper.cacheDisable(response); + } else { + DispatcherHelper.cacheForWorld(response, (int)age); + } + + + + + + + + + ((com.arsdigita.london.navigation.ui.object.ComplexObjectList) itemList).setDefinition(new CMSDataCollectionDefinition()); + ((com.arsdigita.london.navigation.ui.object.ComplexObjectList) itemList).setRenderer(new CMSDataCollectionRenderer()); + ((com.arsdigita.london.navigation.ui.object.ComplexObjectList) itemList).getDefinition().setObjectType("com.arsdigita.cms.ContentPage"); + ((com.arsdigita.london.navigation.ui.object.SimpleObjectList) itemList).getDefinition().addOrder("parent.categories.link.sortKey"); + ((com.arsdigita.london.navigation.ui.object.ComplexObjectList) itemList).getRenderer().setPageSize(20); + ((com.arsdigita.london.navigation.ui.object.ComplexObjectList) itemList).getRenderer().setSpecializeObjects(true); + + + + + + + \ No newline at end of file