The problem with this left function is that it is going to show a specified 
number of characters, regardless of whether or not the last character is 
the end of a word. To get around this, we created another field in the 
database that contained a short description for the first page. That way, 
we have complete control over where the description ends and we can plan 
the field around that. Usually it contains the first sentence.


At 12:16 AM 6/12/00 -0500, you wrote:
>Try the "Left" string function. From the CF Language Reference manual:
>
>Left
>Returns the count of characters from the beginning of a string argument.
>
>Syntax
>Left(string, count)
>
>string
>String from which the leftmost characters are retrieved.
>
>count
>Positive integer indicating how many characters to return.
>
>For example, if your database news story field is called "story" then:
>
><CFOUTPUT>#Left(Story, 100)# </CFOUTPUT>  will show the first 100
>characters.
>
>
>Chris Montgomery               [EMAIL PROTECTED]
>:: Web development/Consulting  http://www.astutia.com ::
>:: Allaire Consulting Partner/ NetObjects Reseller    ::
>:: 210-490-3249/888-745-7603   Fax 210-490-4692       ::
>:: Find a Job in San Antonio   http://www.sajobnet.com::
>
>
> >-----Original Message-----
> >From: Kelly Matthews [mailto:[EMAIL PROTECTED]]
> >Sent: Saturday, June 10, 2000 11:39 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: Question...
> >
> >
> >Ok can this be done. Say I have  small database of news stories and
> >on the front page of the website we want to include say the first
> >sentence or 2 of the story which then links to the full story.  How
> >do I, for the front page, limit it to only pull and display the first
> >so many characters of the story instead of the whole thing?? Can this
> >be done?
> >Kelly
> >---------------------------------------------------------------
> >---------------
> >Archives: http://www.eGroups.com/list/cf-talk
> >To Unsubscribe visit
> >http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists
>/cf_talk or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to