Zip Archive

Digest

Cascade allows for multiple images to be uploaded at a single time via the Zip archive importer as well as using SOAP-based web services

An archive is a file that contains other files packaged together. There are many formats that are used to package files in such a manner, the most widely known are probably the ZIP file format (cross-platform) and the Stuffit file format (Mac only). There are many other archive file formats as well. An archive allows a computer user to organize and transfer files easily. For example, Cascade Server allows the user to upload a ZIP archive into the system and then unzip it. This is very useful when uploading multiple files at once, or content for integration: instead of uploading each HTML file and image individually using the File Override option, they can be packaged into one file, uploaded once, and then the system will unpack it as if each file were transferred individually.

Concept

Creating (Uploading) Zip Archives in Cascade

Cascade makes it easy for users to upload a new Zip Archive. The steps are basically the same as when uploading an image or pdf file, except instead of going to New -> Default -> File from the top navigation window, please instead go to Tools -> Import -> Zip Archive.

import zip
 

Simply browse to select the Zip Archive to upload, and choose the folder in Cascade to place it in.

Technical

Uploading Zip Archives in Cascade

**Please Note - In Cascade Server versions 5.2 and earlier, by default Managers and Administrators are the only roles that can upload/import zip archives, unless the preference has been enabled to allow all roles to upload zip files. In versions 5.5 and later, the default preference will be gone, and every role has an ability that either allows or disallows them from uploading zip archives.

To Upload a new Zip Archive:

1.       Use the top navigation menu to go to: Tools -> Import -> Zip Archive.

import zip archive

2.       Click Browse to select the Zip Archive you’d like to upload.

3.       Choose the Folder in which to place the Zip Archive.

4.       Press Submit.

Importing an Existing Web Site Via Zip Archive


To import an existing site using the Zip Archive feature, please ensure that you have zipped the folder containing all the files for your site and not just the files inside the folder.

  1. Click on (or create) the base folder in which you want your site to be unpacked.

  2. On the top navigation menu, select Tools -> Import-> Zip Archive.

  3. Click the Browse… button for the Zip Archive field, and select your zipped folder.

  4. The Placement Folder should automatically be set to the current folder, but this can be changed by clicking on the browse icon.

  5. Click Submit to upload the zip file into the CMS, and have it unpacked.

import zip

Unpacking a Zip Archive in Cascade (Importing an Existing Web Site)

Once you have created a new template from a web page in your existing site, you need to upload and unpack the zip file. This process is just the same as it would be to upload and unpack a group of images using a Zip Archive.

To upload and unpack a zip file:

  1. Log-in to Cascade Server.

  2. Click on Home in the top navigation menu if you aren’t already in the asset management interface.

  3. In the left Asset Tree, click on the desired folder where you’d like to unpack your Zip Archive.

  4. Now that you are in our desired folder, use the top navigation menu, and select Tools -> Import -> Zip Archive.

  5. Click the Browse… button for the Zip Archive field and select (your-template-name-here).zip.

  6. The Placement Folder is the folder in which you’d like the files unpacked; this can be changed by clicking on the browse icon.

  7. Now click Submit to upload and unpack the zip file into the CMS.

unpack zip archive

Example Zip for Automatic Site Import

If you have the original files for your site, you can zip all the folders into a single zip file. If you don’t have the originals or have dynamic pages that you would like made into files, you can download and run HTTrack Website Copier from http://www.httrack.com/ to create a local site copy. For this walk through, we will use our example demo site, which can be downloaded from http://www.hannonhill.com/downloads/demo.zipand saved locally.

archive

Uploading and Unpacking the Zip File

To upload the zip file:

  1. Click on the web folder, located in the left asset tree, in the Home area of the system.

  2. From there, click Tools -> Import -> Zip Archive for the upload screen.

  3. Click the Browse… button for the Zip Archive field, and choose the downloaded demo.zip zip file.

  4. The Placement Folder will already be set to web, but this may be changed if needed.

  5. Now click the Submit button to upload and unpack your site files.

Integrate Folder Conversion

Now with all the HTML files in the system, you need to have them converted to system pages.

  1. From the top navigation menu, select Tools -> Import -> Integrate Folder.

  2. Choose the designated system folder for the Base Folder. We will choose web as our folder.

  3. Browse for a Base Page upon which all converted files will be based (this integrate folder process can be done several times on different folders if different page types need to be used). We will choose /web/example as our base page.

  4. Next, if the existing content is based on a Dreamweaver Template (our demo site is), type a comma separated list of Default Region Names. These are the names of the Dreamweaver editable regions for the main page content. The content will be chosen from the first name specified in the list that is found in the file. By default, without any regions specified in the imported files, all content between the tags is put in the word processor region. No modifications are necessary when using the supplied demo site.

  5. Click the Submit button to start the integration queue. Wait 30 seconds and click on web in the left asset tree to see the resulting system pages.

 integrate folder

All of your existing content has been converted to system pages. It is best to click through the pages and see the imported content in order to check for correctness. By default, without any regions specified in the imported files, all of the content between the body is put in the word processor region.

Tips on Preparing Content for Import

With a local copy of a static file-based site downloaded, there are several preparation steps that can be taken before bringing the content into the CMS.

1. Remove Design Elements
For pages that do not use Dreamweaver Templates or separate navigation items using techniques such as scripting or server-side includes, it is important to remove any templates or common elements before bringing the files in. For example, if a site has a common header and footer, these should be removed from the files by using a global search and replace. Using Dreamweaver MX 2004, a global search and replace of plain text or a regular expression can be performed against an entire site to remove design elements. If your site is already database driven or uses header and footer includes, you can modify the include files removing their content and making them empty. Run HTTrack against your site to make it static with only the main content in the body tags. With prepared static content, do the standard process outlined above.

2. Optimize Titles
For pages that have common title words, it is best to do a global search and replace in order to remove the common words because this information will be specified or dynamically created in the system template. For example, if every page title starts with My Company Inc. followed by the specific title information for the page, then a global search and replace should be done looking for <title >My Company Inc. – and replacing it with simply <title >. This is important because all of the static HTML page titles will be placed in the title metadata field for the system page (meta description and meta keywords will also be automatically placed in the appropriate system metadata field upon importing).

The resulting static files that are left, following these preparation steps, are bare bone files with only the core content remaining. Everything between the <body > and corresponding </body > tags will be placed in the page default content area. This content will be made available for editing in a browser-based word processor, while the HTML metadata values will be put in the appropriate system metadata fields.

With the static files converted to dynamic pages, the publish file extensions will be added based on the target settings once the content is sent to the destination servers. In the CMS, all the converted files will be standard pages with the appropriate icon.

Related Links