views:

1473

answers:

2

Im creating a custom template. On the front page I want to display an article and a readmore link.

The article is called "Article 1" and is in the section "Test" catagory "Cat". Its access level is public.

How can i show the first 100 words of the article, and its title, on the front page and have a readmore link under it which will point to the full article. I tried using a mod_newsflash but it just doesnt show the readmore link.

I am using Joomla 1.5. Thx

A: 

I use the same mod_newsflash on a couple of sites and have had no problems so far. It's very important that you activate the "Read more... Link" option to "Show" under "Module - Edit -> Parameters". Another thing is that your article must have exactly one "Read more..." on your desired position. Where do you find this "Read more..." thing? Just go to your article, edit it and down there next to "Image", "Pagebreak" should be this button. If you really want it to always break exactly after 100 words or after a specific amount of characters, I think you need to come up with something on your own. For example: Just take the whole article, use strip_tags() to get the pure text and after that just split(" ", $input, 100)/implode(" ", $input) the text. Good luck!

merkuro
Thanks. It seems so simple now. I just never noticed the read more button when entering an article >.<
Ozzy
A: 

There is a extension named auto readmore wich does exactly what you need