Welcome Guest, Not a member yet? Register   Sign In
What is the correct way to show small part and read more for an article in the main page?
#3

[eluser]Aken[/eluser]
I would do it one of two ways:

1) As minerbog mentioned, you could add a specific "intro" field. This is helpful if you want your intro text to be used in other places except the main article page. Good for teaser lines and that sort of thing.

2) Assuming you're using MySQL, there is a built-in SUBSTRING() [ or SUBSTR() ] string function available that allows you to pull specific chunks of text. Great way to pull only the first X words of your article. You can then use PHP to remove any partial words at the end, in case your character limit ended mid-word (you could also go back to the end of a sentence).


Messages In This Thread
What is the correct way to show small part and read more for an article in the main page? - by El Forum - 08-01-2012, 03:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB