Hi Dan,
Dan Stromberg schrieb:
I have an established lenya CMS to work with. I need to update it semi-
regularly with new information that is pretty similar.
I assume you are using Lenya 1.2.x?
The click-click-paste-click-click-paste-click-click-click thing is
getting kind of old.
Is there an automatic way I can add new pages and modify preexisting
pages?
There is no standard mechanism, but this is a quite typical usage
scenario. Basically there are two approaches:
(a) use the Lenya API to import the documents
(b) modify the repository directly
Approach (a) should be preferred in virtually any cases, since (b) has
many drawbacks. You have to
- be absolutely familiar with the storage internals
- update your code when the storage internals change
- shutdown the application to avoid concurrent modification issues
If you modify existing documents, you bypass the versioning, workflow
etc. which will lead to inconsistent states of the documents.
Especially if you want to run the import while the server is running,
I'd strongly recommend to implement it using the Java API, properly
checking out the involved documents etc.
Our lenya server is running on a Linux host, if it matters.
I found a directory that contains the pages I want to add to - can I just
stick some fresh HTML in there from a bash or python script, and find
where it's linked from and modify that with some sort of HTML parser
(probably from python)? Or do I need to study a bunch of stuff first and
work in java and/or XSLT? If I make changes to the HTML directly, will
they be lost next time someone uses the CMS via a browser?
If somebody has an example of doing something that's similar to this,
that'd get me going quickly. Java (and XSLT?) would be fine.
Lenya 2.0-dev contains some code which imports external data. It can't
be ported to 1.2.x without changes, but maybe it helps to get started:
http://svn.apache.org/viewvc/lenya/trunk/src/modules/export/java/src/org/apache/lenya/cms/export/Importer.java?view=log
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]