Forums / Developer / Site Structure Import

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

eZ debug

Timing: Jan 31 2025 01:29:16
Script start
Timing: Jan 31 2025 01:29:16
Module start 'content'
Timing: Jan 31 2025 01:29:16
Module end 'content'
Timing: Jan 31 2025 01:29:17
Script end

Main resources:

Total runtime0.3080 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.8281370.3047
Module start 'content' 0.00780.0135 958.13281,001.4844
Module end 'content' 0.02130.2867 1,959.61723,889.8984
Script end 0.3080  5,849.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00461.5092200.0002
Check MTime0.00140.4436200.0001
Mysql Total
Database connection0.00070.215610.0007
Mysqli_queries0.201365.35441410.0014
Looping result0.00190.62741390.0000
Template Total0.286392.910.2863
Template load0.00080.250910.0008
Template processing0.285592.683510.2855
Override
Cache load0.00050.166910.0005
Sytem overhead
Fetch class attribute can translate value0.00220.699310.0022
XML
Image XML parsing0.00040.114310.0004
General
dbfile0.00541.7479200.0003
String conversion0.00000.001930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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