[SOLVED] Loading content via a UDT - API?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

[SOLVED] Loading content via a UDT - API?

Post 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.
Last edited by essexboyracer on Sun Sep 18, 2011 7:43 pm, edited 1 time in total.
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

Re: Loading content via a UDT - API?

Post by essexboyracer »

The function in CGContentUtils.module.php , _createDomContentObj(), looks like what I need to do, but how to get that into a UDT?
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Loading content via a UDT - API?

Post by Jos »

Something like this?

Code: Select all

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

$content = $CGContentUtils->_createDomContentObj(doesittakeanyparameters?);
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

Re: Loading content via a UDT - API?

Post by essexboyracer »

Really? that easy! are there any docs for this, so I can learn it myself?
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Loading content via a UDT - API?

Post 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 ;)
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

Re: Loading content via a UDT - API?

Post 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
essexboyracer
Forum Members
Forum Members
Posts: 85
Joined: Wed Jun 20, 2007 5:40 pm

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

Post by essexboyracer »

Nervermind, I found Symphony CMS which uses XML as its default data storage and templating, ideal for XML product feeds
Post Reply

Return to “CMSMS Core”