Your opinion to this page?
Deutsch Deutsch English English

Introduction

Usually things evolve as follows:
One starts by installiing WB locally. Afterwards one is enthusiastic and decides to upload the pages onto some web space. There are tutorials available and most often it works.
But some time later one tries another new module and sometimes invests quite some time to produce a nice page. Finally one is pleased with the results and wants to copy the page to the web space, too. Sure one does not want to enter all data again. The accompanying files (if any) may be uploaded by ftp, but how about the data in the database? To upload the entire database again is not an option because usually there have been made quite some changes on the web space. And now what?

For such cases I wrote two modules: Export Section and Import Section. Both modules still are in RC state, so use them on your own risk! Nevertheless I assume noone will destroy its database by using them. Language files are still missing, currently I use genglish ;-) The layout is simple, too, but the most important part is the function anyway.

Requirement for both modules is WB 2.8 with PHP 5.2. If someone is able to test with lower versions, I am interested in the results.

Already tested page types

Until now, Export and Import have been successfully tested by the following page types:

All Testers are asked for Feedback which page types have been tested with which results.

The module Export Section

This module needs to be installed on the site from where a page will be exported, of course. It is an Admin Tool. I did not reinvent the wheel, but used parts of the module Addon File Editor from Christian Sommer (doc) as well as Section Picker from Ruud Eisinga (Ruud) :-)

Usage

  1. Admin-Tools - Export Section
  2. Select the section you want to export
  3. Save
  4. Website Baker will offer a text file for download. The data is in a special xml format.

Limitations

There are page types whose export does make no sense. The tool won't work with sections of those types. Currently the following modules have been identified to fall into this category, but there might be more:

The module Import Section

This module is my own development. Sure it needs to be installed on the site where a page will be imported. Of course, this might be the same site where you export from. In this case you just duplicate a section.

Usage

  1. Create a new page (or a new section on an existing page) of type Import Section.
  2. Now you have a file upload field. Select the text file with the xml content you (or someone else) created with the Export Section module.
  3. Submit the file.
  4. You will see some debug text which might be useful for bug tracking.
  5. If all worked like expected, the last line should read "Changed section succesfully to type ..."
  6. Use the Back function of your browser, and you will see the imported section.

Limitations

 Warnings

FAQ

Q: What I did is I exported News section, then I imported it again.. But, when I add new news on the page where I exported it, the news doesnt appear on page where I imported section.. Does it suppose to work this way ?

A: Yes, it is supposed to work this way. You export exactly the state during some time, and that it is. If you change the original copy later, the copy will not change automagically, too. If you need this behaviour, you could use the Section Picker module.


Q: But I want to manage news for dfferent sites on a central place.

A: In this case you should just create a RSS feed for the news.