apache > lenya
 

New Publication How-To

This how to briefly describes how to setup a new empty publication. Since there is no click and klack function to create new publications (i.e. with a wizard) the instructions given here will focus on editing xml, xslt and xmap files Although this situation will change for 2.0 (it already has a 'New Publication' wizard), at the moment threse are the steps that you should follow.

Note: At the moment, you need the source distribution of Lenya to create new publications. Note: All http://localhost URLs on this page are assuming that you use the Jetty servlet engine.

Attached is a diagram of a typical Lenya setup.

First of all make a copy of the default publication and rename it (the new publication is named NEW-PUB).

Directory structure:

/home/foo/
          lenya-1.2.x/         <- $LENYA_HOME
          publications/        <- $PUBLICATIONS_HOME
          NEW-PUB              <- $NEW_PUB_HOME

Linux

cd $LENYA_HOME/src/webapp/lenya/pubs 
cp -r default $PUBLICATIONS_HOME/NEW-PUB

Windows

cd %LENYA_HOME%\src\webapp\lenya\pubs\ 
copy -r default %PUBLICATIONS_HOME%\NEW-PUB

Then follow these steps:

  1. Move to $NEW_PUB_HOME folder and edit the publication.xml file in this directory to describe your new publication. Specifically, edit the /lenya:publication/lenya:name tag to reflect the name of your publication.

  2. Move to $NEW_PUB_HOME/config/ac/ and edit ac.xconf changing every occurence of default to NEW-PUB;

  3. Move to $NEW_PUB_HOME/config/tasks/ and edit targets.xml changing <property name="export.expression" value="/lenya/default/live/"/> to <property name="export.expression" value="/lenya/NEW-PUB/live/"/>.

  4. Deploy your publication (see Deploy Publication How-To)

  5. The should then show up on the page at http://localhost:8888;

  6. Add new users using http://localhost:8888/NEW-PUB/admin/users.html (for security reasons it's better to remove default users or at least change passwords) If you get a Java Script error, check if the files under NEW-PUB have the correct permissions to be modified by your servlet engine;

  7. Delete pages of default publication leaving only the Home page available. Probably you would like to delete german pages (german is labelled with "de" string) and add your language:

    1. in Authoring mode http:/localhost:8888/NEW-PUB/info-authoring/index.html?lenya.usecase=info-overview&lenya.step=showscreen, click on "de" tab and start removing the german pages

    2. edit the $NEW_PUB_HOME/config/publication.xconf file removing the element <language>de</language> (be sure you have removed all german pages before) and eventually add you language. Pay attention, you can add your language even if there's no available translation for the Lenya CMS interface (i.e. you can add "ru" for russian even if available Lenya is translated only in english or german). The servlet container has to be restarted to apply the changes to the language configuration.

Optional:

  1. Move to $NEW_PUB_HOME/config/doctypes/samples/ and edit xhtml.xml changing the page that is shown when you create a new document.

  2. Start changing the look & feel of default publication to the one you want to your new publication. See: Look & Feel How-To

  3. Deploy your publication when you made changes to the source.