External sources: SQL, CSV, and Code Sources
Calling Code Sources from templates
This document describes the workings of Silva from the point of view of a Silva site Manager role. This role has the same rights as a Zope manager.
For the purposes of locating objects, the Silva installation is assumed to be ‘default’, where Silva is installed at the root level of a Zope instance, and named ‘silva’. All paths in this document begin with /silva.
Let’s start with a few tips which are good to know.
What follows is a quick listing, with links to more information. Some of these items actually reside on the file system.
In
the ZMI, at /silva/manage or /silva/manage_main, you’ll see a number of
Zope and Silva objects. Silva objects are Publications, Folders,
Documents, etc.
Note that if Silva objects are present in the root publication, those items will be mingled in the contents listing as well.
Members
Folder
containing information about Silva members, i.e. Zope users who have
been assigned a Silva specific role. Normally this folder should be
left alone; the Member objects are created implicitly on demand.
Removing a Member object does not revoke the roles from the
corresponding user; it only removes the additional information
available via the “user settings” page of the SMI.
content.html
ZPT that helps render public pages. See Template design
frontend.css
Cascading Style Sheet that determine the typographical styles in the Preview screen and public pages. See Template design
globals
This
folder (silva/globals) resides on the file system. It contains Silva
user interface elements, and will be overwritten in an upgrade.
index
A Silva index document in the Silva root (or Silva
‘top’, as it’s called in the documentation for
Author Editor/Chief).
index_html
A Python script that handles web requests. See Template design
layout_macro.html
ZPT macro that renders public pages. See Template design
preview_html
A Python script that handles Silva previews. Will
be covered in the Silva Developer documentation inside the Silva product download.
rename-to-override.html
ZPT that can be used to create custom
pages. See Template design
standard_error_message
ZPT which displays an error message in Silva style (as opposed to Zope
style).
standard_unauthorized_message
ZPT which displays an unauthorized message in Silva style (as opposed
to Zope style).
Silva Services are found in the Silva root in the ZMI. Click on the Services tab to see the list of Service options.
Some services have settings that can be modified. Configurable services have a title following the id, e.g.:
service_messages (Silva Message Service)
Other services have no adjustable settings; these don’t have a title.
If you click the id you’ll get a screen with a description of the
service.
service_extensions
Configuration for Silva core and Extension Products.
SilvaNews is an
example of an extension – it’s not part of the Silva core
– that must be installed separately. Your own and third
party extensions can be installed and uninstalled here. See below
for installing layout templates.
service_files
Controls storage of Silva File objects
service_members
Controls membership / subscription issues.
service_messages
Set up email address for workflow support.
The default Silva layout templates can be reinstalled – e.g.
after an upgrade – with the install default layout button Service Extensions.
It may be that you have modified some of the existing layout
templates, such as the stylesheet frontend.css. Existing
templates won’t be overwritten. Instead the prefix ‘default_’ will
be prepended to the new id, preserving your work yet allowing you
to examine any differences.
Remove or rename existing layout templates, such as:
Several key aspects are defined in the properties tab of the Silva root.
Fig. 1. View of the Silva (Shakespeare) portal in the ZMI
To
make a backup:
Place a check against the Silva root. In Fig. 1 it’s
the Silva icon next to Shakespeare.
Choose Export at the base of the
listings and Export your site. The file you save is a zexp file.
To import a Silva site choose Import at the base of the listings and upload a .zexp of a Silva site.
Make a backup before you upgrade.
When you upgrade, sometimes the stylesheet ‘frontend.css’ has been
adjusted. If this is the case, it will be noted in UPGRADE.txt (we
know everybody reads it :-) We recommend – especially if you haven’t
changed the stylesheet – that you delete/rename the
old one and install default layout. If
you see red text in the SMI or preview this is a signal
that your frontend.css should be updated, since you’re missing
key selectors for content display.
If you are upgrading Silva between major versions it’s a good idea
to look in the new template layout_macro.html. Often there are
improvements – such as related link references (<link
rel="...) for accessibility – and optimizations in the tal
code. Don’t forget to read the Upgrade.txt inside the Silva product download.
After a Silva upgrade, in the ZMI go to /services/service_extensions to refresh the content.
Read Troubleshooting.txt inside the Silva product download.
© Copyright 2002-2008 Infrae.
All rights reserved.