You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by MShah <mo...@yahoo.com> on 2008/12/02 01:43:29 UTC
Creating a page and adding data elements programmatically in Lenya?
I am fairly new to Lenya and CMS and was wondering if the following are
possible using Lenya 2.0 API:
1. Create a new page in the site.
2. Add data elements to the newly created page in step 1 above and assign
values to the data element? The value will be a string value like the name
of a file.
Any inputs regarding the same will be much appreciated.
Best regards,
Monisha
--
View this message in context: http://www.nabble.com/Creating-a-page-and-adding-data-elements-programmatically-in-Lenya--tp20783862p20783862.html
Sent from the Lenya - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Creating a page and adding data elements programmatically in
Lenya?
Posted by Andreas Hartmann <an...@apache.org>.
Hi Monisha,
MShah schrieb:
> I am fairly new to Lenya and CMS and was wondering if the following are
> possible using Lenya 2.0 API:
>
> 1. Create a new page in the site.
> 2. Add data elements to the newly created page in step 1 above and assign
> values to the data element? The value will be a string value like the name
> of a file.
sure, this is possible.
You could take this document as a starting point:
http://lenya.apache.org/docu20/concepts/documents.html
The API documentation will help you find out which functionality is
provided by the Lenya repository API.
A popular approach to manipulating documents is:
* Create a wrapper class, e.g. ArticleWrapper for article documents. The
wrapper is an abstraction of the document's data model. It hides the XML
structure and makes client code easier to understand.
* In the wrapper, use DOM to manipulate the document's XML structure.
* Implement a usecase which calls the wrapper.
BTW, there's no need to cross-post on the developer list. We're all
reading the user list, it just might take a while before someone finds
the time to answer.
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org