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

Paul-Inge Flakstad flakstad at npolar.no
Fri Apr 9 09:50:28 CEST 2010


Hi Peter,

Yes, it should be possible to create new resources in direct edit mode, although I haven't tried it yet (we rarely use direct edit). But AFAIK, you would have to append a counter value to your filenames. If there is a single file in your folder, called "article_0001.html", a new file would be named "article_0002.html" - this naming is done automatically by OpenCms.

Whether you can keep your users away from the workplace entirely, I don't know, as they would probably have to create folders for years/months, in order to avoid one single, huge folder.

It may very well be that your initial approach is better suited for your specific case of wanting to use only direct edit. You can always use a robots.txt file to help you with broken links issues - I'm not even sure if broken links are really an issue with your approach.

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 13:48
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] Remove nodes from a structured XML file
> 
> 
> 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
> >
> 
> _______________________________________________
> 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