Skip to content

Instantly share code, notes, and snippets.

@neokoenig
Created January 8, 2015 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neokoenig/f4e103f81fa732f7ca5c to your computer and use it in GitHub Desktop.
Save neokoenig/f4e103f81fa732f7ca5c to your computer and use it in GitHub Desktop.
evaluate?
<cfif structkeyexists(evaluate(arguments.objectname), "featuredimage")>
<img src="#_getImagePath(src=evaluate(arguments.objectname).featuredimage)#">
</cfif>
@bayornet
Copy link

bayornet commented Jan 8, 2015

what is an example of arguments.objectname? Usually in this context I would expect some kind of factory to return your object if you only have the name of it. e.g coldspring. Or, if it is just a struct, then it must exist in some kind of scope in coldfusion (request or application or variables etc) in which case you could do <cfif structkeyexists(application[arguments.objectname], "featuredimage")>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment