[opencms-dev] Order Articles by Category
Matt Levy
mlevy at fta.co.uk
Thu Jul 21 17:06:18 CEST 2011
Hi Christian,
I have created a blog module for OpenCMS 7.5.x that does the sort of thing you need. You can see an example of it here http://www.twinlensphotography.co.uk/blog and http://www.fta.co.uk/blogs/media_and_campaigns/index.html
Essentially, there is a CmsCategoryService class in package org.opencms.relations that you supply a base folder and it will return a list of CmsCategory objects you can use. I have a set of classes and JSPs that use this functionality within the blog and the user selects the category when editing the blog entry. I am happy to forward on the source code for the module so you can see how it works if that helps?
Regards
Matt
-----Original Message-----
From: opencms-dev-bounces at opencms.org on behalf of Christian Funken
Sent: Thu 7/21/2011 15:22
To: The OpenCms mailing list
Subject: [opencms-dev] Order Articles by Category
Hello mailing list.
In a blog-like enviroment ( not exactly, but close enough for this question to make sense ), I need to be able to sort the articles shown on a site based on their category.
I use decentralized categories and the CategoryWidget within the .xsd and that seems to work fine for the articles themselves.
However, I can't find a good way to display all available categories on the site. Is there some system register I can access for that information?
Or can I otherwise read through the folders and display whatever is inside the lokal _categories folder?
I saw that OpenCMS 8 has something called the "cms:resourceload" tag which seems to work for this sort of thing.
Sadly, I am stuck with 7.5 for the time being.
( I did however also see something called CmsResource in the API... is there some way to use this to get to a folder listing? )
Thanks and have a nice day.
Christian Funken
_______________________________
VISION UNLTD. CREATIVE WORX UG
Bruesselerstr. 85
D-50672 Koeln
Fon +49 (0)221 56978 0
Fax +49 (0)221 56978 11
c.funken at vucx.de
check out our web page: www.vucx.de <http://www.vucx.de/>
die medienprofis: www.profigilde.de <http://www.profigilde.de/>
official agent for visual media directory: www.productionparadise.com <http://www.productionparadise.com/>
----------------------------------------------------------------
Confidentiality note:
---------------------------------------------------------------
The information contained in this message is legally privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this message is strictly prohibited. lf you have received this message in error, please notify us immediately and return the original message to us at info at fta.co.uk.
Please note that the FTA is able to, and reserves the right to, monitor e-mail communications passing through its network. This footnote also confirms that Sophos Antivirus has swept this message for the presence of computer viruses.
Freight Transport Association, Hermes House, St John's Road, Tunbridge Wells, Kent TN4 9UZ
Telephone: (01892) 526171 Fax: (01892) 534989
Freight Transport Association Limited. Registered Office Hermes House, St John's Road, Tunbridge Wells, Kent TN4 9UZ.
Registered in England Number 391957.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4449 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110721/97ffa2ae/attachment.bin>
More information about the opencms-dev
mailing list