Zope Editing Guide

The guidelines that follow are just that -- guidelines. If you chose to not follow the guidelines then most likely your page will not display properly or, for the really egregious departures, it will cause a Zope error.

If you have any questions on style or information not found in this guide, join the #infra channel and ask - most likely bear, kosh or elefth will be available to answer your question.

If you need an account for editing these pages, contact bear.

Site ToDo
HOWTO: Structured Text
HOWTO: File/Image
HOWTO: Zope

Naming Convention

Names must begin with an alpha character (a-z or A-Z) and can be followed by any alpha-numeric character with the following exceptions: dot ("."), dash ("-") or space.

Creating Files

To create a file, choose CompoundDoc from the "Select a type to add" pull-down menu. Enter the name you want to give to the file in the ID field and then select "WorldforgeDocument" for the profile.

After pressing the Add button, you will then be shown a screen with fields for Title, Text and others. The Title is used by Zope for the page header and is also displayed as the link text if referenced as a hyperlink.

The index_html filename has special meaning to Zope - if found within a folder Zope will display that file's text when the user navigates to the folder name.

Adding a Folder

To add a folder, choose "Folder" in the "Select a type to add" pull-down menu. Enter the name you want to give to the folder in the ID field. Please keep names lowercase and small in size: around 18 characters or less.

The Title of the folder is an alternate name that is used in the navigation system. Spaces are allowed here.

Do not check either the Create public interface or the Create user folder checkboxes.

Adding Links

This is fairly simple once you learn it but it can be a trifle complex the first time. The best way to make a link is to have the Zope database make the link for you since then the link will be correct no matter what the hostname is, where the document is moved etc.

The first thing you need to know is zope is a database and that the urls you give it map to a query string and the query string it maps to is very simple so long as there are no dots in the object names which is why most of the special characters are forbidden.

For example say you are at www.worldforge.org/dev/index_html, the database query would be wf.dev.index_html -- what you want to do is give zope enough information to uniquely find the object you want to link to but generally not a while lot more then that since there is no need. Once you get the object you can create your link. For example wf.dev.index_html.link() would create your link.

Now you just need one final piece of syntax and that is the the dtml code which tells zope to run that piece of code and create the link in the displayed page for you. To run the code you need to use <dtml-var "pythoncode"> So to put it all together to get a link to /dev/index_html that always works the best method is to use the following syntax:

<dtml-var "wf.dev.index_html.link()">

The above link would be displayed like this: foo

In most cases you will be linking to files that are in the same folder and in that case this simplifies a good deal. In that case it becomes

<a href="<dtml-var "objectname.absolute_url()">"><dtml-var "objectname.title_or_id()"></a>

In this case objectname is just the name of the object you want to refer to.

Clicking the "View" link will allow you to view the changes you have made to the page.

The URL to reference your new file is http://www.worldforge.org/path/to/file/filename

The inline option will allow you to view the data in the page, but on a plain background and without the WorldForge layout surrounding it.

History will tell you when the last changes were made to the file in any way, be it text edited or prefs edited, etc, and by whom. Eventually the compare feature will work, where you can compare different edits of the document, but for now, be warned that this feature DOES NOT WORK. Nor does the Copy To Present feature. This will essentially become "undo". You will be able to replace the current document with an older copy. You are advised against using either of these features at this time. It is very possible that the usage of these features will break something. If you ignore this warning, please don't submit a bug report saying they are broken; we know.

----------------

Please submit any odd behaviours that you might come across. We need to get bugs worked out of the system. Comments about the site should be sent to the infra team (bear, kosh and/or elefth).