Only show first two lines of the content with a link (more..) on the home page. Only show top 2 newly added news.

Comments

vm’s picture

investigate the views.module

priceline’s picture

I saw few posts about views.. But I need to display date on one column, and title and teaser text on the other column.. Thanks,

nevets’s picture

If you mean columns in the same block, you might be able to do it completely with css though you can always theme the view.

priceline’s picture

but I need to display more after the first two lines. How can I do it? Thanks,

nevets’s picture

What more do you need to display after the first two lines?

priceline’s picture

just like teaser.. display the first two lines, then a link "more.." for rest of the content.

vm’s picture

set those in your view

priceline’s picture

I set the more link to "yes", but still cant see the link. I want to display the first 2 lines of content, and provide a link for rest of the content.

Name: Block
Title: Latest News
Change settings for this styleStyle: Grid
Change settings for this styleRow style: Fields
Use AJAX: No
Use pager: No
Items to display: 2
More link: Yes
Distinct: No
Access: Unrestricted
Exposed form in block: No
Header: None
Footer: None
Empty text: None
Theme: Information

vm’s picture

In future it helps to make your requests clear to avoid confusion.

I believe the more link is for the entire view, not specific pieces of content. ex: the more link shows after there is more content than can be shown in your view settings. In this case, the more link would show after the 3rd piece of content is pulled as your view is set to 2.

Please describe exactly how your view is set up.

It may help to export your view, put it on pastebin.com or drupalbin.com and link to that here. Maybe someone going over your view can take a look. You have some specifics there I'm not sure how they can be handled.

specifically: "I want to display the first 2 lines of content, and provide a link for rest of the content."