Another option would be to place the entire description in a div and then
truncate it via css.

http://www.w3schools.com/cssref/css3_pr_text-overflow.asp

On Sat, Mar 7, 2015 at 1:31 AM, Mark Spence <markpence...@gmail.com> wrote:

>
> I have a long product description I am trying to truncate.  I could just
> truncate it, but I don't want to break off sentences.  Here is the solution
> I came up with but it does not seem to have any effect.
>
> Any ideas?
>
> <cfset variables.description = qry_productsGet.productdescription>
> <cfif len(variables.description) gt 200>
>     <cfloop condition="i eq false">
>         <cfset variables.description =
> listDeleteAt(variables.description,listLen(variables.description, "."),
> ".")>
>         <cfif len(variables.description) lte 200>
>             <cfset i = true>
>         </cfif>
>     </cfloop>
> </cfif>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360231
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to