Uploading HTML Files for the Plinkit Training Manual
Notes on uploading HTML files generated by Toni Mantych (e.g. for the HTML version of the Plinkit Training Manual).
1. Install Enfold Desktop
Enfold Desktop is a pretty cool Product that allows users to access/edit/update Plone content objects (images, pages, etc) via a Windows Explorer-like interface from their local PC. It's also a great way to upload a large number files, for example, when you have large set of HTML files that were developed "offline".
The instructions are pretty straight-forward from Enfold Systems -- download and install the "server" side of the software (four Plone Products available from http://www.enfoldsystems.com/), perform the necessary setup steps, and then install the "client" on your PC.
2. Prepare the HTML files
There are a number of tasks that need to be performed before uploading due to some issues with the way the HTML files were generated and how Enfold Desktop populates certain Page properties (namely the filename becomes the Title of the Page).
- Manually edit each file to remove the following line:
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
Not doing so will result in a Unicode Error should you ever try to edit the page through Plone using Kupu.
Note: this step may not be needed in future revisions of the HTML format of the Plinkit Training Manual. - Remove any <h1> or <h2> headings from each file because in Plone, the Title of the page is rendered as an <h1> heading and Enfold Desktop populates the Title property with the filename. Luckily for us, the filenames correspond to the Titles we want!
3. Upload Image and HTML Files via WebDav with Enfold Desktop
Follow the instructions on how to create a new session/connection. After that, it's just a matter of dragging/dropping (or copying/pasting) the folders and files (everything but the CSS file) from your PC to a folder on a Plone site.
4. Make Some Final Tweaks
Page Titles
Because Enfold Desktop uses the entire file name for the object Title, we now have a bunch of Pages in Plone with ".htm" trailing in the Titles. The easiest way to fix this is by using Enfold Desktop to update the Title property of each page:
- In Enfold Desktop, right-click on each file and select Properties.
- In the Properties pop-up, delete ".htm" from the Title (NOT from the Name!)
- Save and repeat for each file.
Note: This is also a good time to make any corrections such as replacing "_" with a single quote (') as needed.
Default Display Pages
From Plone, you will need to set the default display for each folder -- select the Page whose Title matches the Title of the Folder, e.g. select the Page, "Welcome to Plinkit" in the "Welcome to Plinkit" Folder)
Reorder the Pages
Unfortunately, short of dragging and dropping each page one by one, in the order they should be displayed in Plone, there is no way of ordering the pages correctly with Enfold Desktop. This means that you must go to the Contents view of each folder and use the up/down arrows to re-order everything correctly.
The correct order of the files can be viewed from the plinkit_help.htm page.
Edit the Cover Page (Optional)
For the Cover Page that also contains the table of contents (plinkit_help.htm) the following changes were made from the original before distributing a .zexp version of the Plinkit Manual:
- Renamed the Title to: Plinkit Training Manual (Online)
- Deleted the title "Plinkit Help" from the Body of the content.
It may be desirable to further modify this page locally.
5. Install and Configure the CSS File (optional)
A CSS file (plinkit_help.css) has been provided to provide the same presentation as the printed version of the manual. To have the plinkit_help.css used only for the online manual, follow these steps:
- In the ZMI, go to the portal_skins/custom folder and add a DTML Method.
- For the Id, use: plinkit_help.css
(not required for but for the sake of consistency it's a good idea) - For the Title, use something like: "Plinkit Manual CSS"
(or whatever you like). - For the File, browse to the "plinkit_help.css" file that was included with all the HTML files and image and click the Add button.
- Next, go to portal_css and scroll to the bottom to the "Add new stylesheet" section.
- For ID enter: plinkit_help.css
- For Tal condition enter:
python:"/plone-folder/" in object_url
where plone-folder is the full path to where the Plinkit Training Manual is located on your Plone site. Note: keep the quotes! - Click Save.
Note: you may need to follow the standard procedures of clearing your browser cache, clearing the ZODB cache, and/or using debug mode in portal_css, etc., before seeing the new CSS or any modifications made to it.