Site Structure Import

Author Message

Josh Thomas

Tuesday 19 June 2007 1:58:14 am

I want to enable eZ to basically build the site structure from an external xml file. This includes container names and hierarchy in the tree menu, any navbar associated with the tree menu, as well as automatically create article objects in each container based on a template. The end goal for this routine is to have 50% of the site content pre-created (in cases where such pre-creation is beneficial), save some user input for each article object.

Is there anything already out there apart from the ezdocumentation that may help?

Any other suggestions on where to start?

Thanks!

Josh Thomas

Tuesday 19 June 2007 3:01:28 pm

I guess maybe I would be better off coming up with an automated way to create an eztemplate based on an xml file. Am I on the right track? Has anyone done anything similar?

Ɓukasz Serwatka

Tuesday 19 June 2007 11:40:21 pm

Do need those content as content objects in eZ Publish? There are some contributions that can handle import for you. Check contrib section. You can of course write your own PHP import script that parse that external XML and creates content objects in eZ Publish. Check ez.no forum for PHP import script examples also book http://www.packtpub.com/book/ezpublish might be useful.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Xavier Dutoit

Tuesday 19 June 2007 11:43:07 pm

Hi,

http://ez.no/community/contribs/import_export/easy_administration/ contains a load module view.

/easyadmin/load/<nodeid>
or if you know the class :
/easyadmin/load/<nodeid>/(class)/<classid>

You could easily extend it so it does it in more than one level.

X+

http://www.sydesy.com

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 15:06:56
Script start
Timing: Jan 18 2025 15:06:56
Module start 'layout'
Timing: Jan 18 2025 15:06:56
Module start 'content'
Timing: Jan 18 2025 15:06:57
Module end 'content'
Timing: Jan 18 2025 15:06:57
Script end

Main resources:

Total runtime1.3021 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 592.5391152.6094
Module start 'layout' 0.00470.0025 745.148439.4141
Module start 'content' 0.00721.2933 784.5625588.6172
Module end 'content' 1.30050.0015 1,373.179712.1875
Script end 1.3020  1,385.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2419160.0002
Check MTime0.00140.1047160.0001
Mysql Total
Database connection0.00060.049710.0006
Mysqli_queries1.252296.1719620.0202
Looping result0.00060.0481600.0000
Template Total1.272197.720.6361
Template load0.00200.157020.0010
Template processing1.270197.542020.6350
Template load and register function0.00030.020010.0003
states
state_id_array0.00140.109610.0014
state_identifier_array0.00200.152520.0010
Override
Cache load0.00170.1302210.0001
Sytem overhead
Fetch class attribute can translate value0.00100.076530.0003
Fetch class attribute name0.00110.084660.0002
XML
Image XML parsing0.00100.080230.0003
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.00090.0688240.0000
String conversion0.00000.000440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs