Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cffunction name="dspBookDetails" output="yes">
- <!--- If the page is a 'Book' then run the function --->
- <cfif $.content('subType') eq 'Book'>
- <cfsavecontent variable="ret">
- <cfoutput>
- <h3>Details</h3>
- <p>
- <!--- Only output if the Author is defined --->
- <cfif len($.content('bookAuthor'))>
- <strong>Author:</strong> #$.content('bookAuthor')#<br />
- </cfif>
- <cfif len($.content('bookReleaseDate'))>
- <strong>Release Date:</strong> #dateFormat($.content('bookReleaseDate'),'mm/dd/yy')#<br />
- </cfif>
- </p>
- </cfoutput>
- </cfsavecontent>
- <cfreturn ret>
- </cfif>
- </cffunction>
- <!---in a .cfm template call the above custom method:--->
- #$.dspBookDetails()#
- in the Mura editor use
- <div>[m ]$.dspBookDetails()[/m ]</div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement