Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

View post processing functions were added in the FarCry 6.2.3 release.

 

Easy Embeds for Views

Excerpt

Ever wanted to just add a link to a YouTube or Vimeo video in your content and have the system convert it to the right embed code? How about a Tweet, or a Gist?  If the embed changes (or your design changes!) how cool would it be to just update a central location and have all your embeds update?

Oh, and ever tried to man handle a large embed in a rich text editor like tinyMCE?  It can be more than a bit messy. One seriously cool solution is to post-process your content. Have contributors add URLs into their content and then let the view automatically determine what the right embed should be.

Great news!

As of 6.2.3.  

Post processing can be added to a webskin using the "postprocess" webskin decorator, and those transformations will be applied before the webskin is cached:

Code Block
<!--- @@postprocess: youtube(width=720,height=405);gist --->

 

This can be applied more selectively with a function or a tag:

 

Code Block
<!--- using a function call --->
<cfset result = application.fc.lib.postprocess.apply(stObj.body,"youtube(width=720,height=405);gist")>
 
<!--- using a custom tag call from the ./tags/webskin library --->
<skin:postprocess functions="youtube(width=720,height=405);gist">#stObj.body#</skin:postprocess>

...

The function strings must be a semi-colon (;) separated list of functions in the form: 

Code Block
[libraryname.]function[(arg1=val1,arg2=val2)]

...