简体   繁体   中英

Joomla Readmore Link To Article

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

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!

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

Well, it bothered me a lot too but the solution was on my nose all the time. In menu items options, you just need to set the "Show Intro Text" to "Show" and the whole article will be shown. That's all. If you set it to "Hide", clicking the read more will only show the remaining part of the article.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM