Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2022-11-18 08:59:10

etc
Developer
Registered: 2010-11-11
Posts: 4,708
Website GitHub

Re: etc_post: post anything from the public side

Bloke wrote #330395:

Could the plugin support (hook into?) the Import/TxpXML so we could also import XML files from other CMSs via your plugin?

Or how about CSV somehow one day? Y’know, for completeness ;)

Actually, this should be already doable via etc_post/etc_query (or smd_xml) combo:

<txp:etc_post user="guest" event="article" step="save">
{
<txp:etc_query url="your_xml_file_url" markup="xml">
"Section":"articles",
"Status":3,
"publish_now":1,
"Body":{$json_encode({//xpath/of/body/node()})}
</txp:etc_query>
}
</txp:etc_post>

Theoretically, one can import any etc_query-readable data (HTML, XML, JSON, CSV, INI, DB, lists, etc) this way and map it to txp fields.

Offline

Board footer

Powered by FluxBB