Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change 
notification.

The following page has been changed by GregorRothfuss:
http://wiki.apache.org/lenya/PicturesHowto

The comment on the change is:
moved to lenya docs

------------------------------------------------------------------------------
- ==  How to use pictures in your Lenya publication ==
+ deleted
  
- 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.
- 
- '''Note:''' ''It might be worth removing these pitfalls in later release and 
making image handling more straightforward and add some comfort functions such 
as visual image browsing or server side resizing. But for now let's focus on 
how to insert any pictures into your publication at all.''
- 
- ===  The different places for pictures ===
- 
- In a standard Lenya publication there are two possible places where pictures 
might be found: 
- 
-  *  In the {{{resources/shared/images}}} folder of you publication.
-  *  In the content folder for a specific page.
- 
- As {{{resources/shared}}} 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.
- 
- The pictures in the {{{resources/shared/images}}} 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
- 
- {{{
- <img src="{$root}/images/project-logo.png"/>
- }}}
- 
- 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.
- 
- 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 ''Assets'' in Lenya and can be uploaded by the editor.
- 
- ===  Prerequisite ===
- 
- In order to allow upload assets, compile Lenya with the parameter 
'''enable.uploads=true''' wich is found in '''build.properties''':
- 
- {{{
- # Enable multipart requests (for security reasons turned off by default.
- # Uncomment to enable)
- 
- enable.uploads=true
- }}}
- 
- This option is commented by default wich means it is ''false''. 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.
- 
- 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.
- 
- '''Note:''' 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 ''Edit with Kupu'' 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 
{{{/dev/null}}}. '''Note for the non-Unix people:''' ''They will be silently 
discarded.''
- 
- ===  Uploading pictures ===
- 
- To upload pictures that belong to a page in your publication, go to that page 
in authoring mode. Then click on the ''Site'' tab. In that view you should find 
a tab called ''Assets''. 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 ''New Asseet'' Button. 
- 
- In the subsequent dialogue use the ''Browse'' 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 ''alt'' attribute in the <img .../> tag; at least not 
automatically.)
- 
- After you have uploaded a file make sure if shows up in the list.
- 
- 
- '''Note for Windows users:''' ''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.''
- 
- Once you have uploaded your pictures to the server they are available to be 
inserted into the page.
- 
- ===  Linking pictures in a document ===
- 
- In order to link a picture that you have uploaded as an asset, you need to 
insert a relative link to {{{doc_id/filename.ext}}}. If for example you are 
editing the page {{{index}}} and you uploaded a picture called 
{{{building.png}}}, you would need to link to {{{index/building.png}}}.
- 
- 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 
{{{/products/enduser/product_a/overview_a}}} the link would still be 
{{{overview_a/photo.jpg}}}.
- 
- 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.
- 
- 

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

Reply via email to