Alternate methods include accessing the database directly or teaching
Geronimo to send XML instead of HTML.  Assuming you need exactly what
you asked for...

I recommend first getting the data to appear in Lenya, then worrying
about complete integration.  This is more important for a newbie as
you will learn about creating pipelines before attempting to create a
new resource type.  You may want both skills, but creating pipelines
is needed for both methods, and a new resource type will complicate
troubleshooting.

Create a pipeline using the HTMLGenerator:
http://cocoon.apache.org/2.1/userdocs/html-generator.html

<map:match="data-document/*" >
   <map:generate src="http://dataserver/database/category1/{1}"; type="html"/>
   <map:transform src="dataHtml2lenyaXhtml.xsl"/>
   <map:serialize type="html"/>
</map:match>
This retrieves the HTML pages as XML.  Change the generate src to the
path on your data server.  You may need the transform to change the
generated XML to match Lenya's document syntax.  First try without a
transform and see what appears.

Copy the lenya-body pipeline and change the match and aggregate:
    <map:match pattern="/data/*">
        <map:aggregate element="cmsbody">
          <map:part
src="cocoon://navigation/publicationId/live/breadcrumb/data.xml"/>
... (other navigation parts replacing {3} {4} {5} hardcoded to the
"data" page. Fix the publicationId in these URLs.)
         <map:part src="cocoon:/data-document/(1)"/>
        </map:aggregate>

Create a top-level document with id "data".  Put links on the data page:
<a href="/data/datapage1.html">Data Page 1</a>

When everything is correct, clicking a link should open a page in your
Lenya layout with the navigation menus of the "data" page and the
content area filled by a page from the data server.

This may be sufficient for your needs.  Using the example:
   /data/datapage1.html
would have content from:
   http://dataserver/database/category1/datapage1.html

Enhancements include:
- Automatic creation of the "data" page to contain links based on what
is available on the data server.
- Creating "/data/pathOnDataServer" documents so the data pages appear
in Lenya's navigation menus.
- Creating a new resource type to retrieve the HTML data pages.  This
is the official method for adding the data pages.  Getting the data
pages to appear properly is much easier using the method outlined
above, and that work will be very useful when creating the new
resource type.

Hope this works,
solprovider

On 11/7/08, MShah <[EMAIL PROTECTED]> wrote:
>  I have a Java application deployed on Geronimo application server which
>  queries the database and renders out static html pages.  I have to get that
>  html page linked to the site pages in lenya.  I know you can pull external
>  XML data from another web server into a website on Lenya, how does it work
>  with static html pages and how do I create links to those pages?
>
>  I am not sure if I am clear enough but this is the requirement that has been
>  communicated to me.
>
>  Any inputs will be much appreciated as I am very new to Lenya and CMS all
>  together.
>
>  Thanks,
>  Moni
>
>  solprovider-2 wrote:
>  > The question is too ambiguous for a simple answer.
>  > Are you linking a webpage?
>  > Are you importing data into Lenya?
>  > - What is the current format?
>  > Are you retrieving data from another system?
>  > - Can the other system provide the data as XML?  Web Service?
>  > - Is the data in a database?  Standard SQL?
>  > The last resort is to write custom Java to access the data.
>  >
>  > Please clarify your goals.
>  >
>  > solprovider
>  >
>  > On 11/7/08, MShah <[EMAIL PROTECTED]> wrote:
>  >>  I want to pull external data into lenya and was wondering how to link it
>  >> to a
>  >>  specific tab on the current site on lenya?  Can someone give me some
>  >>  feedback on this.  I am very new to using lenya and a CMS all together.
>  >>
>  >>  Your input in this regards will be much appreciated.
>  >>
>  >>  Thanks,
>  >>  Moni

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to