SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cffunction name="dspBookDetails" output="yes">
  2.     <!--- If the page is a 'Book' then run the function --->
  3.     <cfif $.content('subType') eq 'Book'>
  4.         <cfsavecontent variable="ret">
  5.             <cfoutput>
  6.                 <h3>Details</h3>
  7.                 <p>
  8.                     <!--- Only output if the Author is defined --->
  9.                     <cfif len($.content('bookAuthor'))>
  10.                         <strong>Author:</strong> #$.content('bookAuthor')#<br />
  11.                     </cfif>
  12.                     <cfif len($.content('bookReleaseDate'))>
  13.                         <strong>Release Date:</strong> #dateFormat($.content('bookReleaseDate'),'mm/dd/yy')#<br />
  14.                     </cfif>
  15.                 </p>
  16.             </cfoutput>
  17.         </cfsavecontent>
  18.          
  19.         <cfreturn ret>
  20.     </cfif>
  21. </cffunction>
  22.  
  23. <!---in a .cfm template call the above custom method:--->
  24. #$.dspBookDetails()#
  25. in the Mura editor use
  26. <div>[m ]$.dspBookDetails()[/m ]</div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top