Page 1 of 1

[SOLVED] Loading content via a UDT - API?

Posted: Sat May 14, 2011 7:30 pm
by essexboyracer
Is it possible to load content into CMSMS via a UDT, perhaps via the API?

I am thinking of parsing affiliate product feeds and loading each 'part' or product as a page, therefore needing to update things like menu name, title, content, page URL and possibly even Page Specific Metadata.

I can already parse a feed and load it onto my own mysql table, but would like to automate the process of building pages with it. You could call it autoblogging perhaps.

Re: Loading content via a UDT - API?

Posted: Sun May 15, 2011 4:25 am
by essexboyracer
The function in CGContentUtils.module.php , _createDomContentObj(), looks like what I need to do, but how to get that into a UDT?

Re: Loading content via a UDT - API?

Posted: Sun May 15, 2011 10:11 pm
by Jos
Something like this?

Code: Select all

$gCms = cmsms();
$CGContentUtils = $gCms->modules['CGContentUtils']['object'];

$content = $CGContentUtils->_createDomContentObj(doesittakeanyparameters?);

Re: Loading content via a UDT - API?

Posted: Mon May 16, 2011 5:36 pm
by essexboyracer
Really? that easy! are there any docs for this, so I can learn it myself?

Re: Loading content via a UDT - API?

Posted: Mon May 16, 2011 10:34 pm
by Jos
Docs... maybe the wiki handbook http://wiki.cmsmadesimple.org/index.php ... fined_Tags

This kind of code is also all around in this forum ;)

Re: Loading content via a UDT - API?

Posted: Sat Aug 13, 2011 8:50 pm
by essexboyracer
I need a bit more assistance with this one, any ideas? I am fine creating a UDT, but using other modules and whether they "takeanyparameters" loses me a bit

Re: [SOLVED] Loading content via a UDT - API?

Posted: Sun Sep 18, 2011 7:44 pm
by essexboyracer
Nervermind, I found Symphony CMS which uses XML as its default data storage and templating, ideal for XML product feeds