Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added close square baracked to createobject

...

Code Block
title./webskins/dmhtml/displayPageStandard.cfm
<!--- only bother if there is related content --->
<cfif arrayLen(stobj.arelatedids)>
  <!--- grab an array of extended data structs for processing --->
  <cfset aExtended=getData(objectid=stobj.objectid, bArraysAsStructs=true) />
  
  <cfloop from="1" to="#arrayLen(aExtended)#" index="i">
    <!--- create an instance of the relevant type based on typename --->
    <cfset oType=createobject("component", application.types[aExtended[i].typename]) />
    <!--- render a specific view for the content item, perhaps a teaser --->
    <cfset HTML=oType.getView(objectid=aExtended[i].objectid, template="displayTeaser") />
    <cfoutput>#HTML#</cfoutput>
  </cfloop>

</cfif>