– Common Function Library Project


Last updated April 29, 2010


Bret Feddern

Version: 0 | Requires: CF5 | Library: CFMLLib

This function allows for outputting lorem ipsum text on the fly. It converts a feed of lorem ipsum text from into a formatted or unformatted return string for output.

Return Values:
returns a string


<cfoutput>Formatted Lorem Ipsum:<br />#cfLipsum()#</cfoutput>
<cfoutput>Unformatted Lorem Ipsum:<br />#cfLipsum(0)#</cfoutput>


Name Description Required
isFormatted strips lorem ipsum text of punctuation and uppercase No

Full UDF Source:

 Converts a feed of lorem ipsum text into a string for output.
 @param isFormatted 	 strips lorem ipsum text of punctuation and uppercase (Optional)
 @return returns a string 
 @author Bret Feddern ( 
 @version 0, April 29, 2010 
<cffunction name="cfLipsum" output="no" returntype="string" displayname="cfLipsum" hint="get a lorem ipsum string from">
	<cfargument name="isFormatted" type="numeric" required="no" default="1" />

	<cfset var theXML = "" />
	<cfset var theGrab = "" />
	<cfset var theLipsum = "" />
	<cfset var theLipsumFeed = "" />
	<!--- get the xml feed --->
	<cfhttp url="#theLipsumFeed#" method="get" resolveUrl="false" />
	<!--- parse and search xml for lorem ipsum --->
	<cfset theXML = XMLParse(cfhttp.filecontent) />
	<cfset theGrab = XMLSearch(theXML, "/feed") />
	<!--- only one lorem ipsum element in the feed --->
	<cfset theLipsum = theGrab[1].lipsum.xmltext />
	<!--- strips lorem ipsum text of punctuation and uppercase --->
	<cfif arguments.isFormatted neq 1>
		<cfset theLipsum = lcase(rereplacenocase(theLipsum, "[^a-z0-9 ]", "", "all")) />
	<cfreturn theLipsum />
blog comments powered by Disqus


Latest Additions

Kevin Cotton added
May 5, 2016

Raymond Camden added
April 25, 2016

Chris Wigginton added
January 18, 2016

Gary Stanton added
November 19, 2015

Sebastiaan Naafs - van Dijk added
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson