|
To add Plug-in support to any type of item
- In the database table for that Item (eg. news) add the field "dccomInstanceIdList"-text(255) allow null.
- In the CMS UDI page for that table for that item (eg. dsp_news.cfm), all the line:
<!--- Plugins ---> <cf_dccom field="dccomInstanceIdList" edit="yes" interfacePath="..\..\..\#APPLICATION.teamworkCMSFolder#\custominterfaces\" type="dccomplugins" pluginNameRefField="refField" display="Plug-ins" shortlist="no" size="40" default="" tab="Plug-ins"></cf_dccom>
- Change the value for attribute pluginNameRefField from "refField" to the one of the other table text fields (e.g. newsTitle). (This field is used to provide a reference name for any new plugins).
- That's the CMS done. Now we just need to tell the website to use plugins...On the page where you are displaying the item (eg. A news item), when you lookup the fields from the database, also lookup the "dccomInstanceIdList" field.
Then you just need to call the SiteEngine module "addPagePlugins.cfm" with this list like so:
<cfif Len( getNewsItem.dccomInstanceIdList )> <cfmodule template="../../SiteEngine/modules/addPagePlugins.cfm" plugInIdList="#getNewsItem.dccomInstanceIdList#"></cfif>
That's it - plugins will now work automatically for this arbitary items.
|