You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/05/11 04:47:17 UTC

svn commit: r169567 - in /lenya/docu/src/documentation/content/xdocs: 1_2_x/how-to/deploy_publication.xml 1_2_x/how-to/look_and_feel.xml 1_2_x/how-to/new_publication.xml site.xml

Author: gregor
Date: Tue May 10 19:47:16 2005
New Revision: 169567

URL: http://svn.apache.org/viewcvs?rev=169567&view=rev
Log:
Added How-Tos from the wiki to the documentation.

Added:
    lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/deploy_publication.xml
    lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/look_and_feel.xml
    lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_publication.xml
Modified:
    lenya/docu/src/documentation/content/xdocs/site.xml

Added: lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/deploy_publication.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/deploy_publication.xml?rev=169567&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/deploy_publication.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/deploy_publication.xml Tue May 10 19:47:16 2005
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id: index.xml 55543 2004-10-26 00:14:59Z gregor $ -->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+  <header>
+    <title>Deploy Publication How-To</title>
+  </header>
+    <body>
+<p>How to deploy a publication in Apache Lenya: </p>
+
+<h4 id="head-4e8484518e11290b9ee62111d0dbd603f11932df">Note:</h4>
+
+<p>It is <strong>not</strong> sufficient to copy the publication directories to the <tt>lenya/pubs</tt> directory of your Lenya installation. This way, the core configuration files are not patched, the libraries are not deployed, and other important deployment steps are not applied. </p>
+
+<h4 id="head-25336e7dc2bcad9b79daba07afd7af57b3236a6c">Deploying a Publication</h4>
+
+<ol type="1">
+<li><p>Download the publication to a directory of your choice. For instance: </p>
+<ul>
+
+<li style="list-style-type:none">
+<source>
+/src
+    /lenya-1.2.x                  &lt;- $LENYA_HOME
+    /projects/lenya/pubs          &lt;- $PUBS_HOME
+                        /my-pub   &lt;- $MY_PUB_HOME
+   </source>
+</li>
+</ul>
+</li>
+<li><p>Declare the publications in <tt>$LENYA_HOME/local.build.properties</tt> using <tt>pubs.root.dirs</tt> </p>
+
+<ul>
+<li><p> For deploying a single publication, add the publication home directory:
+ <tt>pubs.root.dirs=src/webapp/lenya/pubs:../../projects/lenya/pubs/my-pub</tt> </p>
+</li>
+<li><p> For deploying a directory containing publications, add the directory:
+ <tt>pubs.root.dirs=src/webapp/lenya/pubs:../../projects/lenya/pubs</tt> </p>
+</li>
+
+</ul>
+</li>
+<li><p>Deploy the publication: </p>
+<ul>
+<li><p> Jetty: <tt>$LENYA_HOME&gt;&nbsp;build</tt> </p>
+</li>
+<li><p> Tomcat: </p>
+<ol type="a">
+<li><p><tt>$LENYA_HOME&gt;&nbsp;build&nbsp;install-pub</tt> </p>
+
+</li>
+<li><p>in case if this fails try it in a different way: <tt>$LENYA_HOME&gt;&nbsp;./build.sh&nbsp;install-pub&nbsp;-Dpub.prefix=""</tt> </p>
+</li>
+</ol>
+</li>
+</ul>
+</li>
+<li class="gap"><p>Restart the servlet engine </p>
+</li>
+<li><p>Go to your Lenya homepage and enjoy the new publication </p>
+
+</li>
+</ol></body>
+</document>
\ No newline at end of file

Added: lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/look_and_feel.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/look_and_feel.xml?rev=169567&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/look_and_feel.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/look_and_feel.xml Tue May 10 19:47:16 2005
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id: index.xml 55543 2004-10-26 00:14:59Z gregor $ -->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+  <header>
+    <title>Look and Feel How-To</title>
+  </header>
+    <body>
+<p>To change your copy of the Default publication into your publication and have some first successes, you probably want to work on two things: </p>
+<ol type="1">
+<li><p>Change the color scheme and fonts to your own taste. </p>
+
+</li>
+<li><p>Replace the page header with your own one. </p>
+</li>
+</ol>
+<p>More advanced topics that are not (yet) covered here might be: </p>
+<ul>
+<li><p>  Put the menu somewhere else </p>
+</li>
+<li><p>  Use a different menu style </p>
+</li>
+<li><p>  Define different and more complex page templates </p>
+
+</li>
+</ul>
+<p>As a first step you will feel much better once you managed 1. and 2. as you will be able to show your new publication to someone and it will not look like just a sample. </p>
+
+<section>
+<title id="head-48d03a781f848cc1709f936dc346a0b04fefcb6b">Changing fonts and colors</title>
+
+<p>Fonts and colors are defined by a Cascading Style Sheet (CSS). For now, don't try to understand the nested sitemaps to find it. Go straight to $LENYA_DIR/your_pub_name/resources/shared/css/page.css. </p>
+<p>Though it says "resources/shared" this is not shared among different publications. In case you mess with it you can always go ahead and copy $LENYA_DIR/default/resources/shared/css/page.css and you are back to the original one. </p>
+<p>Make any changes, reload in your browser and you will see them. That's it for here. </p>
+<p>Note: I assume you are familiar with CSS and how to use them to create dynamically looking menus in pure HTML. If not, Google will be your best friend. This is nothing specific to Lenya.
+ For an introduction to CSS try the <a  href="http://www.nypl.org/styleguide/css/"> NYPL online Style Guide</a>, for other good tutorials <a  href="http://www.alistapart.com/"> a list apart</a> and for invaluable hints and quirks <a  href="http://css-discuss.incutio.com/?page=FrontPage"> css-discuss</a>.  </p>
+</section><section>
+<title id="head-b454d82a4ed2d09ec2a591f3f24d7bf0d07e52f0">Replacing the page header</title>
+
+<p>Have a look at the file $LENYA_DIR/your_pub_name/xslt/page2xhtml.xsl and look for this piece in it: </p>
+
+<pre>
+      &lt;table width="100%" cellpadding="0" cellspacing="0" border="0"&gt;
+        &lt;tr&gt;
+          &lt;td id="publication-title"&gt;Welcome to the Default Publication!&lt;/td&gt;
+
+          &lt;td id="project-logo"&gt;&lt;img src="{$root}/images/project-logo.png"/&gt;&lt;/td&gt;
+        &lt;/tr&gt;
+      &lt;/table&gt;
+</pre>
+<p>This is the page header. Put in what you want. It's that simple! </p>
+</section><section>
+<title id="head-3c25d4848127ea4921c40dfeee910b6a0216b60a">Altering navigational components (Tabs, Breadcrumbs and Menus)</title>
+
+<p>As long as it is sufficient to change the fonts and colors or navigational elements such as Breadcrumbs, Tabs oder Menus you can get away with changes to the CSS. In case you decide you want to go without some of them (for example you might not even want any breadcrumbs on your site) you can change that by modifying the XSLT as described above. </p>
+<p>But in case you want to change the <strong>behaviour</strong> of the navigational elements it's getting a bit more complex. Changing the behaviour would mean for example you would want the whole menu tree to be shown at all times, not just the top level menu items with only the subitems of the currently selected item. </p>
+<p>The navigational elements are built from the file sitetree.xml (look for it in the directory structure) using XSLTs that are usually global to Lenya and therefore not part of you publication. But the global XSLTs can be overridden with local ones quite easily. </p>
+<p>All it takes is to create the files </p>
+
+<pre>
+$LENYA_DIR/lenya/pubs/__your_pub_name__/lenya/xslt/navigation/breadcrumbs.xsl
+$LENYA_DIR/lenya/pubs/__your_pub_name__/lenya/xslt/navigation/tabs.xsl
+$LENYA_DIR/lenya/pubs/__your_pub_name__/lenya/xslt/navigation/menu.xsl
+</pre>
+<p>which will be used in favor of the core files </p>
+
+<pre>
+$LENYA_DIR/lenya/lenya/xslt/navigation/breadcrumbs.xsl
+$LENYA_DIR/lenya/lenya/xslt/navigation/tabs.xsl
+$LENYA_DIR/lenya/lenya/xslt/navigation/menu.xsl
+</pre>
+<p>Usually, you will not want to use a completely different version of the stylesheet. So it is recommended to include the core file using <tt>&lt;xsl:import/&gt;</tt>. </p>
+<p>This is possible because of a built-in fallback mechanism that will make Lenya use the global XSLTs in case there are no local versions inside the publication.
+ See the <a href="site:navigation">Navigation Framework</a> for details on this. </p>    </section></body>
+</document>
\ No newline at end of file

Added: lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_publication.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_publication.xml?rev=169567&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_publication.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_publication.xml Tue May 10 19:47:16 2005
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id: index.xml 55543 2004-10-26 00:14:59Z gregor $ -->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+  <header>
+    <title>New Publication How-To</title>
+  </header>
+    <body>
+        <p>This how to briefly describes how to setup a new <em>empty</em> 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 1.4 (it already has a 'New Publication' wizard), at the moment threse are the steps that you should follow. </p>
+
+<p><strong>Note:</strong> At the moment, you need the source distribution of Lenya to create new publications.
+ <strong>Note:</strong> All <tt>http://localhost</tt> URLs on this page are assuming that you use the Jetty servlet engine. </p>
+<p>Attached is a diagram of a <a  href="typical-lenya-setup.pdf">typical Lenya setup</a>. </p>
+<p>First of all make a copy of the default publication and rename it (the new publication is named NEW-PUB). </p>
+
+<p>Directory structure: 
+</p>
+<source>
+/home/foo/
+          lenya-1.2.x/         &lt;- $LENYA_HOME
+          publications/        &lt;- $PUBLICATIONS_HOME
+          NEW-PUB              &lt;- $NEW_PUB_HOME
+</source>
+<p>Linux </p>
+<source>
+cd $LENYA_HOME/src/webapp/lenya/pubs 
+cp -r default $PUBLICATIONS_HOME/NEW-PUB
+</source>
+<p>Windows </p>
+<source>
+cd %LENYA_HOME%\src\webapp\lenya\pubs\ 
+copy -r default %PUBLICATIONS_HOME%\NEW-PUB
+
+</source>
+<p>Then follow these steps: </p>
+<ol type="1">
+<li><p>Move to <tt>$NEW_PUB_HOME</tt> folder and edit the <tt>publication.xml</tt> file in this directory to describe your new publication. Specifically, edit the <tt>/lenya:publication/lenya:name</tt> tag to reflect the name of your publication. </p>
+</li>
+<li><p>Move to <tt>$NEW_PUB_HOME/config/ac/</tt> and edit <tt>ac.xconf</tt> changing every occurence of default to NEW-PUB; </p>
+
+</li>
+<li><p>Move to <tt>$NEW_PUB_HOME/config/tasks/</tt> and edit <tt>targets.xml</tt> changing <tt>&lt;property&nbsp;name="export.expression"&nbsp;value="/lenya/default/live/"/&gt;</tt> to <tt>&lt;property&nbsp;name="export.expression"&nbsp;value="/lenya/NEW-PUB/live/"/&gt;</tt>. </p>
+
+</li>
+<li><p>Deploy your publication (see <a  href="site:deploypub">Deploy Publication How-To</a>) </p>
+</li>
+<li><p>The should then show up on the page at <tt>http://localhost:8888</tt>; </p>
+</li>
+<li><p>Add new users using <tt>http://localhost:8888/NEW-PUB/admin/users.html</tt> (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; </p>
+
+</li>
+<li><p>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: </p>
+<ol type="1">
+<li><p>in Authoring mode <tt>http:/localhost:8888/NEW-PUB/info-authoring/index.html?lenya.usecase=info-overview&amp;lenya.step=showscreen</tt>, click on "de" tab and start removing the german pages </p>
+</li>
+<li><p>edit the <tt>$NEW_PUB_HOME/config/publication.xconf</tt> file removing the element <tt>&lt;language&gt;de&lt;/language&gt;</tt>
+ (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. </p>
+
+</li>
+</ol>
+</li>
+</ol>
+<p>Optional: </p>
+<ol type="1">
+<li><p>Move to <tt>$NEW_PUB_HOME/config/doctypes/samples/</tt> and edit <tt>xhtml.xml</tt> changing the page that is shown when you create a new document. </p>
+</li>
+<li><p>Start changing the look &amp; feel of default publication to the one you want to your new publication. See: <a  href="/lenya/ApplicationLookandFeelHowto">ApplicationLookandFeelHowto</a> </p>
+
+</li>
+<li><p>Deploy your publication when you made changes to the source. </p>
+</li>
+</ol>    </body>
+</document>
\ No newline at end of file

Modified: lenya/docu/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/site.xml?rev=169567&r1=169566&r2=169567&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/site.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/site.xml Tue May 10 19:47:16 2005
@@ -100,6 +100,11 @@
                 <mod_proxy_and_lenya_cont href="mod_proxy_and_lenya_continued.html" label="6b. Mod Proxy and Lenya"/>
             </tutorial>
 
+            <howtos href="how-to/" label="How-To">
+                <newpub href="new_publication.html" label="New Publication"/>
+                <deploypub href="deploy_publication.html" label="Deploy Publication"/>
+                <lookandfeel href="look_and_feel.html" label="Look and Feel"/>
+            </howtos>
             <components href="components/" label="Components">
                 <accesscontrol href="accesscontrol/" label="Access&#160;Control">
                     <ac-terms href="terms.html" label="Basic Terms"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org