Skip to content

Instantly share code, notes, and snippets.

@JonnyHayes
JonnyHayes / xferrc-en-nl.cfm
Created October 13, 2015 20:20
Method to transfer related content from one siteID to another in mura cms.
<cfset siteID = "en">
<cfset remoteSiteID = "nl">
<cfset $ = application.serviceFactory.getBean('$').init(siteID)>
<cfset pluginConfig = $.getBean('pluginManager').getConfig('MuraTranslations')>
<cfset translationManager = createObject("component", "plugins.#pluginConfig.getDirectory()#.cfcs.translationManager").init($.getBean('configBean'), pluginConfig)>
<cfif not structKeyExists(session, "rs")>
<cfquery name="rs">
select distinct contentID, siteID from tcontentrelated where siteID = <cfqueryparam cfsqltype="cf_sql_varchar" value="#siteID#">
</cfquery>