I do not want my first article (which is published sticky at the top of frontpage) to be shortened and provided with the 'read more' link. I want the article to display in full and without any 'read more' buttons. I already have a few successfully executed drupal sites and they all have this article shortened but the site i am working on now is running on Jackson theme.

Please how can i achieve this?

Thanks.

Comments

LarsKramer’s picture

First steps:
- Download the Views module
- Enable the default view called "Front page" included with Views
- Clear the caches: Configuration > Develpment > Performance
- Go to Configuration > System > Site information and set your front page to the path of the view ("frontpage")

Configuration of the view:
- Go the edit page of your frontpage view
- Add an attachment display
- Set it to display before the page display
- in Format, select "Show full content"
- in Filters, add "Content: Sticky (Yes)"

For more tutorials on Views module, check out Taming the Beast: Learn views with NodeOne

Ashford’s picture

You can add the teaser break any where you want to when you are typing your body text.

This is my teaser text...
<!--break-->
This is my text after the teaser...

If you are using the WYSIWYG module, I know that TinyMCE has a button you can add to place the teaser_break.

Drupal WYSIWYG Tip: I create a Role and a special Input Format for "Techie". This allows me to add the more advanced buttons to TinyMce that I only want my web site admin/editor people using.

chike’s picture

the teaser break did it for me. but can i take off the 'read more' button entirely? I have displayed all i want in the article and there is nothing to read more again.

thanks.

Ashford’s picture

I am sure there are many ways to do this. Custom CSS, custom node template, and a custom View are the methods I would consider using.

1. CSS

Look at the HTML code. If you use FireBug with FireFox, it is easy to right click on the Read More link and choose 'Inspect Element' from the options offered in the list. Do you see a DIV or CLASS that is distinct to that node? I would try to make it work with my CSS file.

What you might see in the Drupal 6 version:
<div id="node-782" class="node sticky">
    more stuff...
      <li ... class="node_read_more first last"><a href="/path_to">Read more</a></li>
    more stuff...
</div>
I would try this in the CSS file.
#node-782.node_read_more a {
   display:none;
}

Be aware, if you are using a Core theme, like Garland, and you edit the Garland CSS file, when you do your next Drupal upgrade you would lose that CSS file when you replace the folders. Custom CSS is an easy solution when using custom Themes.

2. Node Template

Create a custom node_template for that specific node. Read how to do this in the Drupal Documentation. You will copy-paste the theme's original node template to make your customized one. Edit the template copy and remove the Read More link.

3. Sticky node + Views block of a 2nd node

Create a node, such as 'Welcome to my Site', with less than 600 words. (Prevents the Read More link.) and make it Sticky, Promoted to Front page.

Create a second node with your Teaser Break at the end.

Create a View using the second node.
Display Type: Block
Row Style: Fields
Fields: Body
Filter: Node: published =yes
Filter: Node: nid = second node id

Using your Admin-Blocks page, assign the Block to the Content Region and Configure it to display on the "Welcome to my Site" node only.

Normally a Block would be added to the bottom of the Content Region. The 'Welcome' node being sticky and the 'Second node' being a block inside the 'Welcome' node, keeps both items at the top of your Front page.

I often discover a simpler way to do something with Drupal about a year after I needed it. The system is so big and my time is so small. For now, this is what I know and what I can share.

LarsKramer’s picture

I proposed a very simple solution in my previous comment:

  1. Make a view of teasers (or use the default one provided by Views), and use that view as your front page
  2. Inside the same view create an attachment page showing full content with filter sticky=yes

As an alternative to step 2 you could also just put the second view inside the header of the first, or the first one into the footer of the second. This a new feature of Views, and few have discovered it: Add header > Global: View area (Insert a view inside an area).

Ashford’s picture

Thank you, Lars. I am glad you reinforced your solution. As I said earlier, I share what I know and quite often there is an easier way. The power of Views is extraordinary. It can be difficult to know all the possibilities and keep up with all the changes. I am glad you are helping us to learn.

shakwano’s picture

Thank you Lars. I just needed to have a sticky article on my first page without showing "read more" link, instead showing full content. A made a view having my article that i wanted to be first on the page (without make it sticky - i just used a Filter Criteria: Content Title = with the name of the article) and used the Header option in my Frontpage view.
And that solved my problem. Thanks again. Cheers!

Bob_robinson’s picture

Go to the administration -> structure -> content type  then select your content type  'manage display' -> CUSTOM DISPLAY SETTINGS ->

select full content  > the one tab will apear , now select full-contant in tabs  -> Now set the body format to 'Default'