[opencms-dev] Remove nodes from a structured XML file

Petr Chelčický petr.chelcicky at centrum.cz
Thu Apr 8 13:47:49 CEST 2010


Thanks Paul for your answer. I didn't realize the thing about broken links, that's a strong argument against my solution. I just wonder whether there is a way to keep my users in direct edit mode and create new news items there even with your solution? I'd like to keep them away from the whole VFS because it would only confuse them.

Peter

______________________________________________________________
> Od: "Paul-Inge Flakstad" <flakstad at npolar.no>
> Komu: The OpenCms mailing list <opencms-dev at opencms.org>
> Datum: 08.04.2010 10:25
> Předmět: Re: [opencms-dev] Remove nodes from a structured XML file
>
>Hi Peter
>
>Our situation is more or less the same as yours - we have a number of news articles, often several in one day, and we want to show the N latest articles on the front page. 
>This is the way we've implemented this: - each news article is one file (of type "structured content"). - each news article is placed in its permanent location, e.g. /en/news/2010/02/newsarticle-from-february.html
>- on the front page, we list the N latest articles in the sub-tree of /en/news/
>
>Since we're placing the articles in their permanent location from the very start, search engines will index the content correctly upon the first crawl, and we won't create broken links since we don't move the content around.
>
>Not exactly the reply you were looking for perhaps, but I hope it helps you in some way.
>
>...and if you still want to do it the way you're suggesting, have a look here, maybe it will give you an idea: http://tinyurl.com/yk74hy5
>
>Best regards,
>Paul
>
>> -----Original Message-----
>> From: opencms-dev-bounces at opencms.org > [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Petr Chelcický
>> Sent: 8. april 2010 09:43
>> To: opencms-dev at opencms.org
>> Subject: [opencms-dev] Remove nodes from a structured XML file
>> > > Hi!
>> > I have a structured XML file which contains news items showed > on the main page. In order to make this file of a manageable > size (there are new news items every day), I want to write a > Java class that would archive older news items and leave only > 10 latest ones (this class would run as a scheduled task once > a day) in the file - by archiving I mean moving into another > file of the same structure. Unfortunately, I haven't found > appropriate methods in OpenCMS API to do this. Do you have > any ideas/samples I could look at?
>> > Thanks a lot in advance,
>> Peter
>> > _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, > please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>> 
>_______________________________________________
>This mail is sent to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://lists.opencms.org/mailman/listinfo/opencms-dev
>



More information about the opencms-dev mailing list