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/15 06:54:57 UTC

svn commit: r170196 - in /lenya/docu/src/documentation/content: 1_2_x/ 1_2_x/how-to/ xdocs/ xdocs/1_2_x/components/editors/ xdocs/1_2_x/how-to/

Author: gregor
Date: Sat May 14 21:54:55 2005
New Revision: 170196

URL: http://svn.apache.org/viewcvs?rev=170196&view=rev
Log:
Moved lots of tutorials from the wiki to the documentation.

Added:
    lenya/docu/src/documentation/content/1_2_x/
    lenya/docu/src/documentation/content/1_2_x/how-to/
    lenya/docu/src/documentation/content/1_2_x/how-to/typical-lenya-setup.pdf
    lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/ldap_authentication.xml
    lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_mime_type.xml
    lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/site_navigation.xml
    lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/using_pictures.xml
Modified:
    lenya/docu/src/documentation/content/xdocs/1_2_x/components/editors/kupu.xml
    lenya/docu/src/documentation/content/xdocs/site.xml

Added: lenya/docu/src/documentation/content/1_2_x/how-to/typical-lenya-setup.pdf
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/1_2_x/how-to/typical-lenya-setup.pdf?rev=170196&view=auto
==============================================================================
Binary files /tmp/tmpKgvZ3m and /tmp/tmpXctUqX differ

Modified: lenya/docu/src/documentation/content/xdocs/1_2_x/components/editors/kupu.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/components/editors/kupu.xml?rev=170196&r1=170195&r2=170196&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/components/editors/kupu.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/components/editors/kupu.xml Sat May 14 21:54:55 2005
@@ -23,16 +23,194 @@
 
 <header> 
     <title>Kupu</title>
-     
-     
-     
 </header> 
 <body> 
 
-<section>
-<title>Download</title>
-<p>Information about Kupu development is available at the <a href="http://kupu.oscom.org/devel/">Kupu site</a>.</p>
+<p>Kupu is a browser based WYSIWYG XHTML editor which is developed independently of Lenya by  <a   href="http://www.oscom.org/">OSCOM</a>
+ and is available at <a href="http://kupu.oscom.org/"> http://kupu.oscom.org/</a>. Kupu can and actually is being used in other projects as well, that have nothing to do with 
+ Java, XML or the Apache software stack. Lenya is just prepared for the Kupu Editor to be plugged in, and ships with Kupu pre-installed. </p>
 
-</section>
+<section><title id="head-9b4594a57c32f9b79007a4319d02bc57c1656c90">Kupu as a sample for integrating editors in general</title>
+
+<p>Understanding the Kupu integration in Lenya is helpful to understand how editors are integrated into Lenya at all. This knowledge is
+ important if you are looking into changing the way Kupu is used inside Lenya or if you are thinking about taking any other editor and integrate it in Lenya. </p>
+
+</section><section><title id="head-cb7dd8a2b1dc471e0805416826a330e77b1cce07">What integrating an editor is all about</title>
+
+<p>From the user's perspective using an editor in Lenya works like this: </p>
+<ol type="1">
+<li><p>Navigate to the item that is to be edited </p>
+</li>
+<li><p>Click on a link to start the editing process (mostly from a pull-down menu, but there are other options) </p>
+
+</li>
+<li><p>Edit </p>
+</li>
+<li><p>Save </p>
+</li>
+<li><p>Enjoy the changes </p>
+</li>
+</ol>
+<p>The link to start the editing is nohting but a GET request to an editing usecase. (See: [<a  href="http://wiki.apache.org/lenya/CreatePageWalkthrough">CreatePageWalkthrough</a>]
+ for some background on Usecases). The reply to that request is the page that contains the editor with the to be edited file loaded. 
+ As simple as that sounds, there is a number of things Lenya has to go through. </p>
+<p>Between Step 2. and 3. (the user clicking on 'Edit' and the editor showing up) Lenya has to </p>
+
+<ol type="1">
+<li><p>Make sure the editor is installed at all </p>
+</li>
+<li><p>Determine the file to be edited </p>
+</li>
+<li><p>Make sure editing is allowed (i.e. the file is not checked out reserved by someone else) </p>
+</li>
+<li><p>Aggregate the content that is to be edited, the editor part of the page itself and whatever parameter the editor needs and serve it to the browser. </p>
+</li>
+</ol>
+<p>Between Step 3. and 4. (Edit and Save) Lenya has to  </p>
+<ol type="1">
+
+<li><p>Make sure the file is still checked out so it can be edited </p>
+</li>
+<li><p>Extract the edited page content from the HTTP POST </p>
+</li>
+<li><p>Save the edited file </p>
+</li>
+<li><p>Check in the edited file </p>
+</li>
+<li><p>Trigger and workflow events on the document that belong to the "edit" event. </p>
+</li>
+</ol>
+<p><em>Note: Kupu allows the user to Save in between and continue editing. This is achieved by using HTTP POST operations. Thus Lenya needs to be prepared to 
+receive multiple updates of the same page and save it before the user might click on 'Exit and Save' so that Step 5 (Display the changed page) is finally triggered.</em> </p>
+
+<h3 id="head-e5a2711688441b7644fbdb11a61307c04fbf2061">The Kupu usecase pipeline in detail</h3>
+
+
+</section><section><title id="head-42ce962db03bd610fa943bc40b509ba6985810fd">step="open"</title>
+
+
+<pre>
+        &lt;map:match pattern="kupu" type="usecase"&gt;
+          &lt;map:match pattern="open" type="step"&gt;
+            &lt;map:match pattern="*/authoring/**.html"&gt;
+
+              &lt;!-- Check for Kupu--&gt;
+              &lt;map:act type="resource-exists" src="resources/kupu/common/kupueditor.js"&gt;
+
+                &lt;map:act type="reserved-checkout"&gt;
+                  &lt;map:generate type="serverpages" src="content/rc/{exception}.xsp"&gt;
+                    &lt;map:parameter name="user" value="{user}"/&gt;
+                    &lt;map:parameter name="filename" value="{filename}"/&gt;
+
+                    &lt;map:parameter name="date" value="{date}"/&gt;
+                    &lt;map:parameter name="message" value="{message}"/&gt;
+                  &lt;/map:generate&gt;
+                  &lt;map:transform src="xslt/rc/rco-exception.xsl"/&gt;
+                  &lt;map:call resource="style-cms-page"/&gt;
+                &lt;/map:act&gt;
+
+                &lt;map:generate src="resources/kupu/apache-lenya/kupumacros.html"/&gt;
+                &lt;map:transform src="resources/kupu/apache-lenya/kupumacros-xhtml.xsl"&gt;
+                  &lt;map:parameter name="contentfile" value="{page-envelope:context-prefix}/{../1}/authoring/{../2}.html?lenya.usecase=kupu&amp;amp;lenya.step=content"/&gt;
+                  &lt;map:parameter name="context" value="{request:contextPath}"/&gt;
+                  &lt;map:parameter name="document-path" value="{page-envelope:document-path}"/&gt;
+
+                  &lt;map:parameter name="root" value="{page-envelope:context-prefix}"/&gt;
+                  &lt;map:parameter name="save-destination" value="{page-envelope:context-prefix}/{../1}/authoring/{../2}.html?lenya.usecase=kupu&amp;amp;lenya.step=save"/&gt;
+                  &lt;map:parameter name="reload-on-save" value="0"/&gt; &lt;!-- 1 means you can see the saving --&gt;
+                  &lt;map:parameter name="use-css" value="1"/&gt;
+                  &lt;map:parameter name="redirect-to" value="{page-envelope:document-name}.html"/&gt;
+
+                &lt;/map:transform&gt;
+                &lt;map:serialize type="html"/&gt;
+              &lt;/map:act&gt;
+              &lt;map:generate src="resources/misc/kupu/download.xhtml"/&gt;
+              &lt;map:call resource="style-cms-page"/&gt;
+            &lt;/map:match&gt;
+
+          &lt;/map:match&gt;
+</pre>
+
+</section><section><title id="head-f6ed65665fa1e56a5371d0ab376effe42403dfae">step="content"</title>
+
+
+<pre>
+          &lt;map:match pattern="content" type="step"&gt;
+            &lt;map:match pattern="*/authoring/**.html"&gt;
+              &lt;map:generate src="pubs/{1}/content/authoring/{page-envelope:document-path}"/&gt;
+
+              &lt;map:transform src="resources/kupu/apache-lenya/kupucontent-xhtml.xsl"&gt;
+                &lt;map:parameter name="css" value="{page-envelope:context-prefix}/{1}/authoring/css/page.css"/&gt;
+              &lt;/map:transform&gt;
+              &lt;map:transform src="xslt/util/strip_namespaces.xsl"/&gt;
+                &lt;map:serialize type="xhtml"/&gt;
+            &lt;/map:match&gt;
+
+          &lt;/map:match&gt;
+</pre>
+
+</section><section><title id="head-211e1aede1d0c03aa8411a1d19a43d3f5d18ccc9">step="save"</title>
+
+
+<pre>
+          &lt;map:match pattern="save" type="step"&gt;
+            &lt;map:select type="request-method"&gt;
+              &lt;map:when test="PUT"&gt;
+
+                &lt;map:act type="reserved-checkout-test"&gt;
+                  &lt;map:generate type="serverpages" src="../../content/rc/{exception}.xsp"&gt;
+                    &lt;map:parameter name="user" value="{user}"/&gt;
+                    &lt;map:parameter name="filename" value="{filename}"/&gt;
+                    &lt;map:parameter name="date" value="{date}"/&gt;
+                    &lt;map:parameter name="message" value="{message}"/&gt;
+
+                  &lt;/map:generate&gt;
+                  &lt;map:transform src="../../xslt/rc/rco-exception.xsl"/&gt;
+                  &lt;map:call resource="style-cms-page"/&gt;
+                &lt;/map:act&gt;
+
+                &lt;map:aggregate element="edit-envelope"&gt;
+                  &lt;map:part element="edited" src="cocoon:/kupu-stream"/&gt;
+
+                  &lt;map:part element="original" src="pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/&gt;
+                &lt;/map:aggregate&gt;
+
+                &lt;map:transform src="resources/kupu/apache-lenya/kupusave-xhtml.xsl"/&gt;
+
+                &lt;map:act type="reserved-checkin"&gt;
+                  &lt;map:generate src="content/rc/{exception}.xsp" type="serverpages"&gt;
+
+                    &lt;map:parameter name="user" value="{user}"/&gt;
+                    &lt;map:parameter name="filename" value="{filename}"/&gt;
+                    &lt;map:parameter name="checkType" value="{checkType}"/&gt;
+                    &lt;map:parameter name="date" value="{date}"/&gt;
+                    &lt;map:parameter name="message" value="{message}"/&gt;
+                  &lt;/map:generate&gt;
+
+                  &lt;map:transform src="xslt/rc/rco-exception.xsl"/&gt;
+                  &lt;map:serialize/&gt;
+                &lt;/map:act&gt;
+
+                &lt;map:transform src="xslt/authoring/edit/addSourceTags.xsl"&gt;
+                  &lt;map:parameter name="source" value="pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/&gt;
+                &lt;/map:transform&gt;
+
+                &lt;map:transform type="write-source"/&gt;
+
+                &lt;!-- Trigger workflow with *edit* action --&gt;
+                &lt;map:act type="workflow"&gt;
+                  &lt;map:parameter name="area" value="{page-envelope:area}"/&gt;
+                  &lt;map:parameter name="document-id" value="{page-envelope:document-id}"/&gt;
+                  &lt;map:parameter name="language" value="{page-envelope:document-language}"/&gt;
+
+                  &lt;map:parameter name="event" value="edit"/&gt;
+                &lt;/map:act&gt;
+
+                &lt;map:serialize type="xml" status-code="204"/&gt;
+              &lt;/map:when&gt;
+            &lt;/map:select&gt;
+          &lt;/map:match&gt;
+
+</pre></section>
 </body>
 </document>

Added: lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/ldap_authentication.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/ldap_authentication.xml?rev=170196&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/ldap_authentication.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/ldap_authentication.xml Sat May 14 21:54:55 2005
@@ -0,0 +1,131 @@
+<?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>LDAP Authentication How-To</title>
+  </header>
+    <body>
+<p>Lenya supports LDAP authentication, and was tested with OpenLDAP and MS Active Directory servers.  Note that only the authentication is done through LDAP;  
+the Lenya administrator still has to assign roles to the users within the Lenya Admin GUI. </p>
+
+<section><title id="head-c6473a347c56f380b016b80abd50c11a339f65ba">Configuring and activating LDAP in Lenya</title>
+
+<ol type="1">
+<li><p>Go to the directory <tt>lenya/pubs/&lt;your-publication-name&gt;/config/ac</tt> </p>
+</li>
+
+<li><p>Edit the file <tt>ac.xconf</tt> and uncomment the line regarding "LDAP support" </p>
+</li>
+<li><p>Go to the subdirectory <tt>passwd</tt> and copy the file <tt>lenya/pubs/&lt;your-publication-name&gt;/config/ac/passwd/ldap.properties.sample</tt> to the file <tt>ldap.properties</tt> in this directory.  </p>
+
+</li>
+<li><p>Edit the file <tt>ldap.properties</tt> with your settings (the sample file contains explanations for the entries) </p>
+</li>
+<li><p>Restart your servlet container, so that the changes take effect </p>
+</li>
+<li><p>Login as administrator. In the user's section, you can now add LDAP users: enter the LDAP id, and provide a Lenya id (which may be the same as the LDAP id). Now add group memberships for this id. </p>
+</li>
+<li><p>You should now be able to login with this LDAP user and password. </p>
+</li>
+</ol>
+
+</section><section><title id="head-7a25fa154659dcf977c814cc7e12b6a94861a91e">Allowing LDAP users to login</title>
+
+<p>Once you have everything configured OK, you can tell Lenya to allow certain LDAP users. It is important to understand that, just because a user exists in LDAP, does not mean she has access to Lenya. The user needs to be explicitly added in Lenya, along with the group memberships. However, the authentication itself (password handling) is then completely handled through LDAP. </p>
+<ol type="1">
+<li><p>In the administration GUI, add the "LDAP user" in order to make this user known to Lenya. You can use the same id for Lenya as the existing LDAP id. </p>
+</li>
+<li><p>Click on the user and add group settings - if user belongs to no groups at all, she will not be able to login </p>
+</li>
+<li><p>Logout and login with the newly created id. </p>
+</li>
+</ol>
+
+</section><section><title id="head-3d053bed75c60a57241ca53fb6de8c2d45aed024">More technical information</title>
+
+<ul>
+<li><p> Lenya uses the Cocoon class LDAPTransformer : for documentation see the Cocoon documentation on <a href="ext:cocoon"> http://cocoon.apache.org</a> </p>
+</li>
+<li><p> This LDAPTransformer is included in Lenya's sitemap (sitemap.xmap) </p>
+
+</li>
+<li><p> This implementation of LDAP Authentication in Lenya works, but might be replaced later by a more advanced implementation and / or by container managed security which would possibly provide these advantages: </p>
+<ul>
+<li><p> Maintainance of the groups in LDAP as well. </p>
+</li>
+<li><p> Remove the need to separately enable each LDAP user in Lenya. </p>
+</li>
+</ul>
+</li>
+</ul>
+</section><section><title id="head-066b132fa6e8227f03b8c07a5bc6057717a7564b">Encrypted LDAP</title>
+
+<ul>
+<li><p>  in the file ldap.properties, set security-protocol to the value ssl and set key-store to the name of your keystore file </p>
+</li>
+<li><p> add the LDAP server certificate file to the local keystore using this command: </p>
+</li>
+</ul>
+
+<pre>
+
+      keytool -import -keystore .keystore -file &lt;ca_cert_file&gt; -alias &lt;yourdomain.com&gt;
+</pre>
+
+</section><section><title id="head-9019cde2979c770be142ebf7a0c6e03dacaf1480">Notes</title>
+
+<ul>
+<li><p> If you modify <tt>ldap.properties</tt>, it may be necessary to restart your servlet container or at least to reload your webapp in order for the changes to take effect. </p>
+
+</li>
+<li><p> Lenya expects the users to be in container called <tt>ou=People</tt> that needs to be nested into the container you provide in the <tt>provider-url</tt> parameter in <tt>ldap.properties</tt>. (Example: <tt>provider-url=ldap://your.ldap.server/ou=intern,dc=example,dc=com</tt> will look for users in <tt>ou=People,ou=intern,dc=example,dc=com</tt>) </p>
+
+</li>
+</ul>
+
+</section><section><title id="head-f1c02c22309913c9392d9f61ac234d4c4b7ed6c3">An example publication using LDAP Authentication: the University of Zurich Lenya Publication</title>
+
+<p>The "University of Zurich Publication" is an example of a publication which uses LDAP authentication. You may wish to install and configure it to authenticate against your LDAP server: this way, you can check whether LDAP authentication is working, before proceeding to activate it in another application. </p>
+<p>Note: this HOW-TO was tested using the "University of Zurich Publication" state on May 26th, 2004. If another version is incompatible with your Lenya installation, don't despair, you will still be able to use the LDAP relevant stuff. </p>
+<ol type="1">
+<li><p>Retrieve the University of Zurich Lenya publications (unitemplate, unizh) described on <a  href="http://wyona.org/">http://wyona.org/</a> </p>
+</li>
+
+<li><p>Go to the <tt>unitemplate/config/ac/passwd</tt> directory and edit <tt>ldap.properties</tt> as described above </p>
+</li>
+<li><p>if secure LDAP is required, add the server certificate to the keystore as described above </p>
+</li>
+<li><p>Deploy the publications (see <a  href="site:deploypub">?</a>Deploy Publication How-To) </p>
+</li>
+
+<li><p>In your browser, refresh your Lenya start page. You should now see, on the left hand side, a link to the "Unitemplate" publication. Login as lenya / levi user and go the Admin area to add a user. </p>
+</li>
+<li><p>Click on "Add University User" (this means LDAP user). In the field "UniAccessID", use the LDAP userid. In the field "CMS User", use the id with which you 
+want to user to log in to Lenya. This may be the same id as for LDAP. </p>
+</li>
+<li><p>Add the desired groups for this user and log out of Lenya. </p>
+</li>
+<li><p>You should now be able to login to Lenya using this new user and his/her LDAP password. </p>
+</li>
+</ol>
+    </section></body>
+</document>
\ No newline at end of file

Added: lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_mime_type.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_mime_type.xml?rev=170196&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_mime_type.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/new_mime_type.xml Sat May 14 21:54:55 2005
@@ -0,0 +1,51 @@
+<?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>Adding a Mime Type How-To</title>
+  </header>
+    <body>
+
+<p>Lenya comes with many mime types supported "off-the-shelf". However the list of mime types is not (and can not be) exhaustive. 
+If you have a Mime-Type which is not yet known to Lenya, such as Avi Videos (Mime-type video/x-msvideo) that the content editors of your site insist on using, proceed as described here. </p>
+
+<section><title id="head-a4bbfe45a08bfc3cc5d0cd1bcfff7fa83460fca6">Enabling the downloads</title>
+
+<p>The resource types which are known to your Lenya installation are defined in the file <tt>lenya/resources.xmap</tt>. Add the new Mime-Type in here, for example for AVI this is:  
+</p>
+<pre>
+          &lt;map:match pattern="*/*/**.avi"&gt;
+            &lt;map:read src="pubs/{1}/resources/{2}/{3}.avi" mime-tyoe="video/x-msvideo" /&gt;
+          &lt;/map:match&gt;
+
+</pre>
+<p>You probably need to restart your servlet container in order for the changes to take effect. </p>
+<p>Now, visitors of your pages should be able to download objects of this mime-type. </p>
+</section>
+<section><title id="head-c0a473eaffabfbcc5c34cdb6c5efff7ab9e5b7f4">Enabling uploading for content editors</title>
+
+<p>In the asset handling, there are some restrictions as to what filetypes you are allowed to upload. If the file extension you require is not yet allowed, 
+edit the file <tt>xslt/authoring/asset.xsl</tt> and add it to the list of types defined in <tt>&nbsp;&lt;xsl:param&nbsp;name="extensions"&nbsp;...</tt> </p>
+
+<p>If you are using BXE, edit the file <tt>xslt/bxeng/asset.xsl</tt> and add it to the list of types defined in <tt>&lt;xsl:param&nbsp;name="extensions"&nbsp;...</tt> </p>
+</section></body>
+</document>
\ No newline at end of file

Added: lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/site_navigation.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/site_navigation.xml?rev=170196&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/site_navigation.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/site_navigation.xml Sat May 14 21:54:55 2005
@@ -0,0 +1,230 @@
+<?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>Site Navigation How-To</title>
+  </header>
+    <body>
+<p>One of the ingredients for a good website is a well structured navigation. The Default publication in Lenya comes with a <a   href="site:navigation">navigation framework</a> that is made up of horizontal tabs, breadcrumbs and a menu on the left. A lot of websites use these navigational elements, but depending on the site you're building, you might want to change the navigation or structure if differently. </p>
+
+<section><title id="head-da34b3ca6421ef687314b2fc0830c891b3cfa8d7">Technical Background: How Lenya builds the site navigation</title>
+
+<p>The source of all navigation elements is the sitetree, which you can find in <tt>PUB_HOME/authoring/sitetree.xml</tt>, <tt>PUB_HOME/live/sitetree.xml</tt>, <tt>PUB_HOME/trash/sitetree.xml</tt> or <tt>PUB_HOME/archive/sitetree.xml</tt> depending on the relevant area. </p>
+<p>The tree you can see in the left half of the screen when you access the <tt>Site</tt> tab in authoring mode is pretty much a 1:1 representation of the site tree. </p>
+
+<p>The sitetree.xml document of the default publication which we will use as an example here looks like this: </p>
+
+<pre>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;site i18n:attr="label" label="Authoring"
+    xmlns="http://apache.org/cocoon/lenya/sitetree/1.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation=
+        "http://apache.org/cocoon/lenya/sitetree/1.0
+        ../../../../resources/entities/sitetree.xsd"
+    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+&gt;
+
+  &lt;node id="index"&gt;
+    &lt;label xml:lang="en"&gt;Home&lt;/label&gt;
+
+    &lt;label xml:lang="de"&gt;Home&lt;/label&gt;
+  &lt;/node&gt;
+
+  &lt;node id="tutorial"&gt;
+    &lt;label xml:lang="en"&gt;Tutorial&lt;/label&gt;
+
+    &lt;label xml:lang="de"&gt;Tutorial&lt;/label&gt;
+
+    &lt;node id="new_doctype"&gt;
+      &lt;label xml:lang="en"&gt;Create new doctype&lt;/label&gt;
+    &lt;/node&gt;
+
+  &lt;/node&gt;
+
+  &lt;node id="concepts"&gt;
+    &lt;label xml:lang="en"&gt;Concepts (english only)&lt;/label&gt;
+  &lt;/node&gt;
+
+  &lt;node id="features"&gt;
+
+    &lt;label xml:lang="en"&gt;Features&lt;/label&gt;
+    &lt;label xml:lang="de"&gt;Funktionen&lt;/label&gt;
+  &lt;/node&gt;
+
+  &lt;node id="doctypes"&gt;
+
+    &lt;label xml:lang="en"&gt;Document Type Examples&lt;/label&gt;
+    &lt;label xml:lang="de"&gt;Dokumenttyp Beispiele&lt;/label&gt;
+     &lt;node id="xhtml-document"&gt;
+      &lt;label xml:lang="en"&gt;XHTML Doctype&lt;/label&gt;
+
+      &lt;label xml:lang="de"&gt;XHTML Dokumenttyp&lt;/label&gt;
+    &lt;/node&gt;
+ &lt;/node&gt;
+
+&lt;/site&gt;
+</pre>
+<p>The default publication defines three navigation elements: </p>
+
+<ul>
+<li><p> Tabs (horizontal) </p>
+</li>
+<li><p> Breadcrumbs </p>
+</li>
+<li><p> Menu (left) </p>
+</li>
+</ul>
+<p>Each of them is built by applying a specific XSLT to sitetree.xml (compare: <a   href="site:navigation">navigation framework</a>). </p>
+
+<p>In case you need additional navigation elements besides tabs, breadcrumbs and menus, you can set up an additional XSLT file and integrate it into the sitemap. (More on this later.) </p>
+
+</section><section><title id="head-07624a224de9bea81634763b7f1dce088cb62439">Tabs as main navigation, menubar as sub-navigation</title>
+
+<p>Depending on the amount of content on your site, you may opt for different styles of navigation. You might for example get rid of the tabs and only use the menu on the left. You can also use the tabs and the menu as parallel means of navigation, which is what the default publication does. If you have a lot of content organized on multiple levels, you might also choose to use the tabs as the first level of navigation and the menu as a second level. </p>
+<p>If your sitetree for example looks like this: </p>
+<p> </p>
+<ul>
+<li><p> Home </p>
+
+</li>
+<li><p> Products </p>
+<ul>
+<li><p> Consumer Products </p>
+<ul>
+<li><p> Product Line A </p>
+</li>
+<li><p> Product Line B </p>
+</li>
+
+<li><p> Product Line C </p>
+</li>
+</ul>
+</li>
+<li><p> Industrial Products </p>
+</li>
+</ul>
+</li>
+<li><p> Services </p>
+<ul>
+<li><p> Maintainance Contracts </p>
+
+</li>
+<li><p> 24-hour Emergency Hotline </p>
+</li>
+</ul>
+</li>
+</ul>
+<p> </p>
+<p>a typical navigation could look this this: </p>
+
+<pre>
++--------------------------------------------------------------------
+|                       | *HOME* | Products | Services |
++--------------------------------------------------------------------
+|
+</pre>
+
+<p>when the user clicks on Producs, a menu will show up: </p>
+
+<pre>
++--------------------------------------------------------------------
+|                       | Home | *PRODUCTS* | Services |
++--------------------------------------------------------------------
+|
+| - Consumer Products
+| - Industrial Products
+|
+</pre>
+<p>clicking on Services will show up a different menu: </p>
+
+<pre>
+
++--------------------------------------------------------------------
+|                       | Home | Products | *SERVICES* |
++--------------------------------------------------------------------
+|
+| - Maintainance 
+|   Contracts
+| - 24-hour Emergency 
+|   Hotline
+
+</pre>
+
+<h5 id="head-5180937f0e533c5948230c73f141c9b2c1aecb65">Simple solution: Hide the menus using CSS</h5>
+
+<p>This behaviour can be achieved by changing the CSS of the default publication. Edit the file </p>
+
+<pre>
+$PUB_HOME/resources/shared/css/page.css
+</pre>
+<p>and add the following snippet, preferrably beneath the existing <tt>menublock</tt> declarations: </p>
+
+<pre>
+.menublock-1 {
+    display: none;
+}
+</pre>
+<p>This way, all non-selected first level menu entries are hidden, which comprises all menu entries belonging to the other tabs. </p>
+
+<h5 id="head-f6b2dc82fbfce6cdd76a5552ee76fcdd6fd55d53">Advanced solution: Exclude the menus using XSLT</h5>
+
+<p>In this approach, you use a custom XSLT stylesheet to generate the menubar XHTML snippet. The file has to be placed at </p>
+
+<pre>
+$PUB_HOME/lenya/xslt/navigation/menu.xsl
+</pre>
+<p>Note the step <tt>/lenya</tt> in the path, this is necessary to tell Lenya that you're overriding a file from the core. The stylesheet might look as follows: </p>
+
+<pre>
+
+&lt;xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
+    xmlns="http://www.w3.org/1999/xhtml"
+    exclude-result-prefixes="nav"
+    &gt;
+
+  &lt;xsl:import href="../../../../../xslt/navigation/menu.xsl"/&gt;
+
+  &lt;xsl:template match="nav:site/nav:node[not(descendant-or-self::nav:node[@current = 'true'])]"/&gt;
+
+  &lt;xsl:template match="nav:site/nav:node[descendant-or-self::nav:node[@current = 'true']]"&gt;
+    &lt;div class="menublock-selected-{count(ancestor-or-self::nav:node)}"&gt;
+
+      &lt;xsl:apply-templates select="nav:node"/&gt;
+    &lt;/div&gt;
+  &lt;/xsl:template&gt;
+
+&lt;/xsl:stylesheet&gt; 
+</pre>
+<ul>
+<li><p> First, you import the core menu XSL so that you can reuse most of the core functionality. </p>
+
+</li>
+<li><p> The first <tt>&lt;xsl:template&gt;</tt> excludes all top-level <tt>&lt;nav:node&gt;</tt> entries which don't contain the current item. </p>
+</li>
+<li><p> The second <tt>&lt;xsl:template&gt;</tt> is optional. If you include it, the top-level menu items won't be displayed in the menubar. </p>
+
+</li>
+</ul></section></body>
+</document>
\ No newline at end of file

Added: lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/using_pictures.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/using_pictures.xml?rev=170196&view=auto
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/using_pictures.xml (added)
+++ lenya/docu/src/documentation/content/xdocs/1_2_x/how-to/using_pictures.xml Sat May 14 21:54:55 2005
@@ -0,0 +1,79 @@
+<?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>Using Pictures How-To</title>
+  </header>
+    <body>
+<p>Many site editors are wondering how it might be possible to add pictures to the pages of their publication. This is quite straigt forward if you know how, but 
+there are some pitfalls that you might trap in for sure and probably never find out of yourself. </p>
+
+
+<section><title id="head-52342aed3b11200e60c0a5637e3097bec839091c">The different places for pictures</title>
+
+<p>In a standard Lenya publication there are two possible places where pictures might be found:  </p>
+<ul>
+<li><p>  In the <tt>resources/shared/images</tt> folder of you publication. </p>
+
+</li>
+<li><p>  In the content folder for a specific page. </p>
+</li>
+</ul>
+<p>As <tt>resources/shared</tt> suggests these are pictures that might be needed in any of the pages and that change seldom, such as the coporate logo or navigational elements for example. </p>
+<p>The pictures in the <tt>resources/shared/images</tt> folder cannot be uploaded by the content editor through the web browser but need to be put there by the administrator. They are referenced in the publication as {{ {$root}/images/name.ext}}, such as </p>
+
+<pre>
+&lt;img src="{$root}/images/project-logo.png"/&gt;
+</pre>
+<p>In many cases the content editor of the site will never have to deal with it as these images are often only referenced from the XSLT template that he or she should also not (have to) touch at all. </p>
+<p>Pictures that are not global to the whole publication but belong to one page and therefore are subject to page editing are saved into the the folder that is named after the document id and holds the page as well. These pictures are called <em>Assets</em> in Lenya and can be uploaded by the editor. </p>
+
+</section><section><title id="head-e0ff8e00b22f3c9fa49be90707f3874722f063b9">Prerequisite</title>
+
+<p>In order to allow upload assets, compile Lenya with the parameter <strong>enable.uploads=true</strong> wich is found in <strong>build.properties</strong>: </p>
+
+<pre>
+# Enable multipart requests (for security reasons turned off by default.
+# Uncomment to enable)
+
+enable.uploads=true
+</pre>
+<p>This option is commented by default wich means it is <em>false</em>. As a Lenya user you cannot change this option, please make sure you recompile and re-install lenya with this option turned on before you continue. </p>
+<p>If the option is off, we will be able to upload assets, but they will be discarded. The user does not receive a warning about that. </p>
+<p><strong>Note:</strong> If the option is off, you might expect the Asset upload to be disabled or to get a warning message similar to the page you see when Kupu is not installed and you try to use the <em>Edit with Kupu</em> menu option. None of this. In case the parameter is off, you can happily upload pictures. You will not get any error messages, but your pictures will be written to <tt>/dev/null</tt>. <strong>Note for the non-Unix people:</strong> <em>They will be silently discarded.</em> </p>
+
+</section><section><title id="head-543727d3f7ff5362456e9f90f91b773a29989b28">Uploading pictures</title>
+
+<p>To upload pictures that belong to a page in your publication, go to that page in authoring mode. Then click on the <em>Site</em> tab. In that view you should find a tab called <em>Assets</em>. Click on that one to get a list of assets (= pictures or other files) that are available for this page. You can upload your files using the <em>New Asseet</em> Button.  </p>
+<p>In the subsequent dialogue use the <em>Browse</em> button to locate a file on your local file system. You can enter a title for the asset which might be more descriptive that just the filename. But this title is used entirely for internal purposes. It will not be visible on the site later. (In other words: It will not become an <em>alt</em> attribute in the &lt;img .../&gt; tag; at least not automatically.) </p>
+
+<p>After you have uploaded a file make sure if shows up in the list. </p>
+<p><strong>Note for Windows users:</strong> <em>Sometimes the file name extensions for picture files on Windows are in uppercase such as PICT0034.JPG. If you choose a file named like this Lenya might complain it could only handle .jpg and refuses that file. Take it literally: Just change the name to PICT0034.jpg and it will work. You don't even have to rename the file itself, it's enough to change it in the upload dialogue.</em> </p>
+<p>Once you have uploaded your pictures to the server they are available to be inserted into the page. </p>
+
+</section><section><title id="head-e89353653618c83710b1579bc01c1fb69cd321b8">Linking pictures in a document</title>
+
+<p>In order to link a picture that you have uploaded as an asset, you need to insert a relative link to <tt>doc_id/filename.ext</tt>. If for example you are editing the page <tt>index</tt> and you uploaded a picture called <tt>building.png</tt>, you would need to link to <tt>index/building.png</tt>. </p>
+
+<p>This is also true for pages that are not directly under home, but anywhere in the hierarchy. If for example you need to link a picture called photo.jpg in <tt>/products/enduser/product_a/overview_a</tt> the link would still be <tt>overview_a/photo.jpg</tt>. </p>
+<p>This remains true in any editor. In Kupu for example you can type this link directly into to the appropriate field and hit the "Insert Image" button beneath. You should see the image appear immediatelly inside the page you are editing. </p></section></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=170196&r1=170195&r2=170196&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/site.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/site.xml Sat May 14 21:54:55 2005
@@ -105,6 +105,9 @@
                 <deploypub href="deploy_publication.html" label="Deploy Publication"/>
                 <lookandfeel href="look_and_feel.html" label="Look and Feel"/>
                 <customresourcetype  href="custom_resourcetype.html" label="Custom Resource Type"/>
+                <newmimetype href="new_mime_type.html" label="Adding Mime Types"/>
+                <sitenavigation href="site_navigation.html" label="Site Navigation"/>
+                <ldapauthentication href="ldap_authentication.html" label="LDAP Authentication"/>
             </howtos>
             <components href="components/" label="Components">
                 <accesscontrol href="accesscontrol/" label="Access&#160;Control">



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