Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement