Forums / General / export node content in HTML
Michal Slocinski
Friday 11 April 2008 3:03:46 pm
Hi
I'd like to implement some script (running from CLI) that would get node ID as input parameter, apply template and give back output in HTML format.
I did some work already but one thing I can't figure out is how to apply some template to XML fetched from DB in order to get HTML back.
Can you point me into some direction of eZ publish API that will allow for that or some short example?
regards,
Michal
Łukasz Serwatka
Saturday 12 April 2008 1:34:44 am
Hi Michał,
You may find this useful:
http://serwatka.net/blog/ezxmltext_how_to_store_and_ouput_your_content http://serwatka.net/blog/fetching_ez_publish_content_objects_with_phphttp://serwatka.net/blog/ez_publish_content_object_attributes_output_rendering
Note that that examples are for PHP4, so you need to take care about the references mostly while working with PHP5.
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Saturday 12 April 2008 3:17:24 am
Thank you for input - it's very valuable for my future experiments and understanding eZ publish APIs.
In the mean time, reviewed 'kernel/content/view.php' and came up with this:
$data = eZNodeviewfunctions::contentViewGenerate( false, $args );
which pretty much does all I need.