Wow - thanks Chris - I'll have a look at that. This is building the functionality in where I am now though, and I did wonder though whether 5.3 would have this in by default (and maybe I could fend off the users with the promise of the future enhancement... :)
On Nov 12, 2:51 pm, Chris Kent <[email protected]> wrote: > Just found some code to get you started finding content item > relationships - grabbed from dmImage.cfc > > <cfloop collection="#application.stcoapi#" item="type"> > <cfloop collection="#application.stcoapi[type].stProps#" > item="prop"> > <cfif > application.stcoapi[type].stProps[prop].metadata.type EQ > "array" AND structKeyExists(application.stcoapi[type].stProps > [prop].metadata,"ftJoin") and listFindNoCase(application.stcoapi > [type].stProps[prop].metadata.ftJoin, "dmimage")> > <cfquery name="stLocal.qCheck" > datasource="#application.dsn#"> > SELECT parentId > FROM #type#_#prop# > WHERE data = '#arguments.objectid#' > </cfquery> > > <cfif stLocal.qCheck.recordCount> > <cfset stLocal.relatedQty = > stLocal.relatedQty + > stLocal.qCheck.recordCount /> > </cfif> > <cfelseif > application.stcoapi[type].stProps[prop].metadata.type EQ > "uuid" AND structKeyExists(application.stcoapi[type].stProps > [prop].metadata,"ftJoin") and listFindNoCase(application.stcoapi > [type].stProps[prop].metadata.ftJoin, "dmimage")> > <cfquery name="stLocal.qCheck" > datasource="#application.dsn#"> > SELECT objectid > FROM #type# > WHERE #prop# = '#arguments.objectid#' > </cfquery> > > <cfif stLocal.qCheck.recordCount> > <cfset stLocal.relatedQty = > stLocal.relatedQty + > stLocal.qCheck.recordCount /> > </cfif> > </cfif> > </cfloop> > </cfloop> > > Use this as a base in your modified webtopOverviewSummary.cfm to list > where teh image is used. > > Chris. > > On Nov 12, 2:44 pm, Chris Kent <[email protected]> wrote: > > > You can amend the webtop overview by copying /core/webskin/types/ > > webtopOverviewSummary.cfm into your project. > > > Copy webtopOverviewSummary.cfm into either /projects/your_project/ > > webskin/types/ You can even have content specific overviews by having > > different webtopOverviewSummary.cfm in each content type webskin > > folder. > > > For your requirement copy /core/webskin/types/ > > webtopOverviewSummary.cfm to /projects/your_project/webskin/types/ > > dmImage and add the required code to display each content item that > > has the image in a .... _aobjectids table. > > > Not sure if there is an API function to find where a content item is > > used without doing some more digging around. > > > Hope this helps to get you started. > > > Chris. > > > On Nov 12, 1:43 pm,ColinJones <[email protected]> wrote: > > > > At the moment in FarCry 5.2, if I add an image from the image library > > > to a webpage, and then later try to delete the image from the library > > > I get a warning message thus: > > > > - Sorry image [some graphic] cannot be delete because it is > > > associated to 3 other item(s). > > > > However it doesn't tell you what items the image is associated with... > > > which means if you really do need to delete the image you have to hunt > > > for the references to it. > > > > Is there functionality already there that would tell me what it's > > > connected to? (maybe I'm missing it), and/or does 5.3 add in this > > > functionality? > > > > Although not appearing to definitely confirm it, the document > > > herehttp://docs.farcrycms.org/display/FCDEV50/webTop+Overview+Changes > > > seems to show "Sections I'm Attached to", and I wondered if this would > > > be what I'm looking for above? > > > > Cheers, > > >Colin. -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry
