import an existing static site in eZ.

Author Message

Olivier Moreau

Thursday 03 July 2008 2:32:51 pm

I'm looking for a way to import an existing static site in eZ. The site contains hundreds of pages and more than a thousand files. I don't feel doing that manualy :-(
Any suggestions ?

Piotrek Karaƛ

Thursday 03 July 2008 9:32:18 pm

Welcome to the community, Olivier!

I don't think I know all the available import extensions, but those that we used required some eZ expertise and at least understanding of how object attributes of certain datatypes behave. It may be especially difficult to move formatted docs into XMLBlock, especially if you do not have a consistent HTML structure.

Also, you should think of content structure. If your existing site has a complex structure that does not follow a proper tree model, then you will have some thinking and development to do. And I haven't seen any automated import for structures, either.

Above all, eZ Publish does not exactly work in page-like way, so before you start thinking of your import, if you do not have much eZ experience, I would recommend studying its content engine. It might be that your site should implement several classes of objects in order to benefit from eZ features.

Check here:
http://ez.no/developer/contribs/import_export

For files, I would use WebDAV for example, you will be able to upload those quickly, no relations thought, as far as I know:
http://ez.no/doc/ez_publish/technical_manual/4_0/features/webdav

Good luck,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Olivier Moreau

Friday 04 July 2008 6:27:32 am

Hi Piotrek and all

Thanks for your warm welcome in the eZ community, I much appreciate your quick reply.

Before posting, we checked the available features and import extensions and did not find much information for such a big issue (from our current point of view).

The basic principle of keeping content and designed separated would of course be hard to respect with a magic "import all" button. The design can be lost, because that's the reason for redoing the site ! The content cannot.

Files are easy with WebDAV and that's a good starting point.
The ideal import script for the database would be to :
- extract all the text from the static web pages and create correponding nodes with 3 attributes : title (text line), body (xml), creation_date (import date for separating old nodes from new ones).
- analyse the site structure and create a corresponding node tree (easy stuff, isn't it ?)

From that content level import, we would finish by hand by recreating the design.

However, your warning is clear :
"It may be especially difficult to move formatted docs into XMLBlock, especially if you do not have a consistent HTML structure."

Like any similar migration problem, the basic question is : "what is more efficient (time/money) : convert by hand or create the [import all] button ?"

Thanks again for your insight on this topic.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:34:36
Script start
Timing: Jan 18 2025 11:34:36
Module start 'layout'
Timing: Jan 18 2025 11:34:36
Module start 'content'
Timing: Jan 18 2025 11:34:36
Module end 'content'
Timing: Jan 18 2025 11:34:36
Script end

Main resources:

Total runtime0.0158 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 589.3594153.4609
Module start 'layout' 0.00470.0031 742.820339.3906
Module start 'content' 0.00780.0057 782.210993.6953
Module end 'content' 0.01350.0023 875.906334.3047
Script end 0.0158  910.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002314.5569140.0002
Check MTime0.00106.3338140.0001
Mysql Total
Database connection0.00042.692310.0004
Mysqli_queries0.002214.153130.0007
Looping result0.00000.082910.0000
Template Total0.001710.810.0017
Template load0.00084.789510.0008
Template processing0.00095.996310.0009
Override
Cache load0.00042.401510.0004
General
dbfile0.00031.714580.0000
String conversion0.00000.051240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs