junior Posted December 24, 2014 Posted December 24, 2014 Hi everyone. I'm newbie to ProcessWire. I need to export particular page's data (including custom fields and children pages) as XML. What is the best approach for that using ProcessWire API? Do I need to write a module for that? Ideally (for simplicity) I'd like to create just one file which could include everything necessary to call ProcessWire API to fetch data and create XML. Then I can call something like http://mywebsite.com/import.php to import data...
SiNNuT Posted December 24, 2014 Posted December 24, 2014 It does not need to be a module. It's easy to bootstrap PW to make a export.php script that spits out the desired xml which can be consumed by other sites or services. https://processwire.com/api/include/ There is also http://modules.processwire.com/modules/service-pages/ which is great but returns json.
junior Posted December 24, 2014 Author Posted December 24, 2014 Thanks. This is exactly what I was looking for.
adrian Posted December 24, 2014 Posted December 24, 2014 Not sure what your final goal is, but you mention wanting to import the xml data as well. Maybe you should take a look at Migrator: https://github.com/adrianbj/ProcessMigrator
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now