Plone Tips
A collection of hopefully helpful tips on using Plone (at the moment more from a managing/technical point of view, rather than a users point of view, but we should have one of those too).
That's it for now, feel free to add to it.
User Run Plone
The Zope and Plone RPMs
are not installed on all DICE machines, if you want to run your own Plone site on a non-priviledge port, then:
- first get the RPMS installed by added the
dice/options/plone.h
header and run updaterpms
.
- decide where you want the root of the Zope instance to live, eg /disk/zope, /home/user/foo/, but where ever it is you'll need to consider if the zope process will be able to access it once the users credentials have expired.
- use
/usr/lib/zope/bin/mkzopeinstance.py
(give it the -h
if you want to see help) with out arguments it will prompt for a directory to create the Zope instance home in (see above), and an administrator username and password. (this should be done by the user who is going to be running the process)
- This will have created a file structure rooted in the specified directory eg in /disk/zope/. To start the instance run
/disk/zope/bin/zopectl start
or one of the other scripts in there, and check what other options they take.
That should be it, your instance will be running on http://localhost:8080/. If you want to change things like enabling debugging mode or the port it listens on, then look at /disk/zope/etc/zope.conf
/disk/zope/Products/ would be the place to put additional Products, for example if you are setting up a clone of the main wcms.inf.ed.ac.uk site, then you could copy the /usr/lib/zope/Products directory to here.
When Product things go wrong
This assumes you can get to the ZMI for the affected site.
I've had cases when installing a Product from the Plone "Site Setup" control panel has left the site broken, ie you get a Python error message. Hopeing that uninstalling the product will fix it, go to the ZMI for the site, eg localhost:8080/<site>/manage/ and look for
portal_quickinstaller
, you'll be able to uninstall the Product from there.
When Skin things go wrong
Change to a new skin also break things some times, leaving the site unaccessible, again go to the ZMI for the site and look for
portal_skins
and click the
properties
tab. At the bottom of that page you see what skin the site is currently using, and can change it back to what was working previously, eg Plone Default.
Customising Templates, eg page headers etc
If people want to make site specific changes to their site, they can do this through the ZMI, but note that it can lead to migration problems when Plone has updates etc.
Assuming the site is using the Institute In A Box (IIAB) theme, and using the DICE site as an example, then the main page template is at:
https://wcms.inf.ed.ac.uk/dice/portal_skins/infinst_custom_templates/main_template/manage_main
They could edit this by clicking on the Customize button, but they probably don't want to do that, mostly that template includes other zope template fragments, eg the header/logo.
<div id="portal-top" i18n:domain="plone">
<div tal:replace="structure provider:plone.portaltop" />
</div>
Through some tortuous route you find that
plone.portaltop
includes various "viewlets" eg look at:
/usr/lib/zope/lib/python/plone/app/layout/viewlets/configure.zcml
and
Products/InformaticsInstituteTheme/profiles/default/viewlets.xml
. These viewlets can be customised at:
https://wcms.inf.ed.ac.uk/dice/portal_view_customizations/registrations.html
look for plone.logo, for example. You'd want to edit the
InstituteTheme one if using IIAB.
As an aside, you can see these viewlets (and potentially shuffle them) by going to the URL:
https://wcms.inf.ed.ac.uk/dice/@@manage-viewlets
Customising Folder Display
This is a rehash of
https://weblion.psu.edu/trac/weblion/wiki/CustomizeFolderViews
If you want to customise the display of autogenerated folder contents, as the ISS and School Services sections do, then first you'll probably want to base your template on one of the existing ones, so via the ZMI go to
portal_skins/plone_content/
and click on the
folder_
template you want to base your template on eg
folder_tabular_view
and then click
customize
and then click "Save Changes" button.
Now click on the
custom
link from the path at the top of the page to take you to
/portal_skins/custom/
and rename your copy to something unique and identifiable eg
folder_tabular_view_custom
. Editing and changing that is left as an exercise to the reader! You'll probably want to set the Title to something meaningful so you can identify it in the Plone interface later.
Once you've made your changes, to be able to use your new template, you need to update the Folder type, by going to /portal_types/Folder on the Properties tab look for the
Available view methods
field and add the name of your customised template to that list, eg in this case
folder_tabular_view_custom
. Remember to save your changes.
Now when back in Plone you should be able to change the Display for your folders to your new customised template.
--
NeilBrown - 09 Jun 2009