Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By tansylam on
Hi,
I just upgrade the site I am working on to Drupal 7. Love the new Modules features.
Can anyone tell me how to remove 'Read more' on the front page (home page) and display the whole page??
I have already install frontpage modules and variablesAPI. I look at every items in configuration and couldn't find a way.
Tansy
Comments
Assign Node to "Default Homepage"
To make something else the the home page in Drupal 7 go to Configuration > SYSTEM > Site Information. There you will find the "Default front page" setting.
This will remove the read more from your page but you will be limited to only having one node/page as your homepage.
- Eric
I open Configuration -> Site
I open Configuration -> Site Information in Drupal 7 a million times, there is no option allow me to change the default front page. All I see is the following: http://www.webpagescreenshot.info/img/684863-128201173432AM
Please help..
Tansy
Hi, In your template.php
Hi,
In your template.php create or modify the following function to force to 'teaser' view to 'full page'
<?php
function themename_preprocess_node(&$variables) {
$variables['view_mode'] = 'full';
$variables['page'] = TRUE;
$variables['content']['links'] = FALSE; // This is to remove the 'Read more' link
}
Hope this helps....
I couldn't find function
I couldn't find function themename_preprocess_node in the template.php file. So I added the function to the template.php file. However, nothing change...
I am working on Drupal 7
Tansy
Blogspot?
Really?
Anyway, there is a workaround:
Enable views, clone the frontpage view (dont't want to hack it up) and change the node display to not show links. It does still link the title but the read more goes away. Then change the default front page path to the name of the new view path ("newfront" etc). Perhaps "not show links" should be the default behavior of the front page.
Philbert
Where is the "Node Display" in Drupal 7
Where is the NodeDisplay, can you be more specific, please.
View Module is my weakness list..
Please and thank you very much..
Tansy
Hello the themename mentioned
Hello the themename mentioned here is not the exact word. Its the name of your actual theme. Say if your theme name is bartik then this will be bartik_preprocess_node. After creating the function with above code, just clear the cache
Fix!
That fixed it for me; so it does work.
I think the Topic Starter forgot to replace the "themename" with the actual theme name.
Note: I just used the last line of code:
$variables['content']['links'] = FALSE;
and added the if(drupal_is_front_page()) function, because I only need it on the FP. May be useful to someone else
Thanks
in the template.php
I just added the following and it removed the "Read More" like I wanted.
$variables['view_mode'] = 'full';
$variables['content']['links'] = FALSE;
But, it didn't fill in the rest of the content from the source. It just cut it off and left it that way. Any ideas?
my mistake
It was pulling in the summary, not the entire body. Never mind.
RE: My Mistake
I am having the same problem, what did you have to change to fix this?
Which drupal 7 version
The option of setting a specific home page comes out of the box in Drupal 7.
Are you by any chance using a release candidate, or a development version, instead of the actual released version of Drupal 7?
Definitely Drupal 7.0
I definitely installed Drupal 7.0, not development or RC version..
The website need to go live next week and I need to fix the front page..Help!!
Now I have only one solution
Copy file modules\node\node.tpl.php in your theme folder and remove line
<?php print render($content['links']); ?>
but this method will remove "read more" link from all nodes on the site...
Or you can wrap this line with "if" statement and check if the node is promoted for front page, like this
<?php if (!$promote){ print render($content['links']); } ?>
Hope this will help
Read More link
I posted a video tutorial on using views to customize the front page. It's on a new website that I am building out with Drupal 7 with videos on the process. The first one is about the front page links. It is also on a Windows vps so I have (so far) one video about 301 redirects in IIS 7 as well.
Check it out at www.siteperspectives.com
You'll notice that this goes to siteperspectives.com without the www for SEO optimization.
Hope this helps,
Philbert
Why it is still not working for me.
For some really strange reason, I tried to override node.tpl and override front page and doesn't seems working for it.. I have been on this for days and just don't understand what is the problem.
The D7 I installed, clearly in Configuration->SiteInformation->Site->Frontpage, I am missing the second line of set default front page. Is there anyway I can not completely reinstall, but reinstall some files that could fix the bug?
Tansy
Philbert. Great video. I'm
Philbert.
Great video. I'm just getting into Views but couldn't make it work until I watched your video.
Like you said. Just two simple changes.
Simple.
That will remove all links,
That will remove all links, but what if I want to get rid of the "Read more" link, but keep the "Comment" link, any ideas?
Just use... function
Just use...
nice fix
I also use the same fix.
Resolved
Perfect !
Do not remove the title and remove the read more.
Nice.
please name of file where
please name of file where this code be placed
perfect!
works well.
Prefect - thanks!
Prefect - thanks!
Select the node for the front
Select the node for the front page in
Configuration -> Site Information --> standard website : node/xy
and Read more goes away.
Wow
Nice tip.
Thanks a lot,
Quaizerman
Nice & Simple
Best Nice & Simple. Thanks
simple is good
Sometimes the simplest solution is best. If you are setting a class on your front page or if you have added a specific css to the front page, you can just do a display:none on the elements you don't want showing.
With no code edit
Administration>Configuration>System
I changed my default front page and number of post on front page, thats it.
Worked for me too... easy.
I did as foolevil did and specified the urlalias (in my case it was "about") of the page I had set for front in the "Default Front Page" field and changed number of items to 1.
Worked for me as well
Just installed Drupal and started playing with it for the first time today and this was starting to drive me a little nuts. I was happy to find this last suggestion - it was perfect and very simple. Forgive me for adding more details that may be obvious to many, but it may help anyone else as new as with this as I am. It took me a minute to realize what to enter in the "Default Front Page" field. Basically, set up your content for the page and when you preview it, the address in the browser will show 'node/x' where 'x' is a number. There may be additional text after the number, but just grab that 'node/x' information and put it into that Default Front Page field. And set the number of items to display to 1. Worked great.
Yeah! It worked!
Thanks! Just simple change default font-page at Administration>Configuration>System>Site information.
simple solution
Configuration--> site information --> Here you will find text box for "default front page"
Under the default front page add the full path of the front page and save configuration. It worked for my drupal 7 website
http://foodnetworks.info
worked for me as well
Great simple is superb.
http://all-interviewquestions.info
Removing the read more link from front page
I got into lots of problem when I attempted to remove the read more link from the front page (Drupal 7). I managed eventually by hacking the core files but when it clicked in my mind that do not hack "core", I immediately changed my mind.
I thought, can't I use view to do that. That is the time I discovered that I had wasted almost a whole day trying to achieve a simple thing through the hard way.
This how it is done. Install views module (drupal 7) and then the ctools. Enable both. Go to structure and choose view. Create view say, home. Set title to none, unformatted. Set the filter creteria to content promoted to front page and published. After this set the path. Save. Go to configurations and change the URL of the index. Done. Go to your front page and there you are. I have posted a detailed article on my website - www.webmakers.co.ke/blog.
A simple way: How to remove Read more on front page (Drupal 7)
By default, the "Default front page" is set to "node," which simply displays articles that have been "Promoted to front page." So, out of the box, yourdomain.com displays content from yourdomain.com/node. Note that when changing the "Default front page" to something other than "node", nodes that are "Promoted to front page" will no longer appear on the front page unless you take specific actions to make them appear. They can however, still be viewed by visiting the relative URL path "node".
The simplest way to change the default front page is to go to 'admin/config/system/site-information', under the 'Front Page' settings section, you can change the default front page there. So, if you want your front page to display the contents of node 24, for example, you would enter 'node/24' as the front page path. If you are using aliases, then you can use the alias as the path. Depending on your display settings at (admin/structure/types/manage/[content_type]/display) for the node type, your node 24 (or its alias) will display on your front page without the read more link. In other words, if your default display settings for the node type is not set to teaser, than, the read more link will not display.
A better way is to use Views. If you are using Views (of course you are using Views), Views comes out-of-the-box with a front page View that you can customize to fit your needs. The Views front page view has a relative path of '/frontpage', therefore, for this View to have effect, you must change your sites Default front page path to 'frontpage' at 'admin/config/system/site-information'. Using Views to display your site's front page gives you much more flexibility in what and how your front page is displayed.
For more information on overriding the default front page behaviors see:
ReggieW
This is probably really simple, but I'm lost
Followed everything you guys said. Except that views just won't work. I keep getting an error every time I try to use views... It simply says: An error occurred at http://MYORGHERE.org/admin/build/views/ajax/display/frontpage/page/items....
Obvs replacing "Myorghere" with my organization's name :) Should I ... move along to a different post? Have I broken views? :(
- Nas
Short and sweet solution
No need to dig into the core modules or node templates.
Firstly download a module called " Read More Links" from "http://drupal.org/project/read_more" then on dash board click on "Configuration" -> "Content authoring" -> "Read More Link" -> "Disable links"
I guess this should solve the issue. With out any additional code needed.
Cheers
None of these options are
None of these options are actually viable.
By disabling the link in "Read More Link" module you remove the link but the rest of the content still does not display on the front page.
Creating a new View with the View module didn't work either...
Drupal's own Site Building Guide says "Do not hack the core." and "Avoid hardcoding." and yet this is no simple way show the entire page I want to show on my home page.
Drupal seems more like a Developers toy set than a viable CMS. I mean if it takes 2-3 times the effort to get the same look and feel as I can with WP or Joomla, whats the point?
Drupal 7 comes with forty
Drupal 7 comes with forty four Core Modules as well as hundreds of others which can be installed with only two clicks.
If you think you can obtain the same 'look and feel using WP or Joomla then you are obviously only using a fraction of the tools that Drupal 7 supplies as standard. WP and Joomla just don't have anywhere near the same features.
If all you want is a Blog plus extra pages....
Then WP is an excellent choice.
If you need fine grained control over views, pages and context, then you cannot come close to Drupal.
Take a look at the videos for page manager/panels, views, and rules on nodeone.se. They aren't that hard and you can do just about anything you need to tailor a site way beyond what Wordpress was meant to be.
Yes, there is some feature overlap but you must look at your needs.
"Custom always takes more effort."
No need to download anything...
I'm a Drupal 7 noob (like a month playing with it) and this is one of the most easy things to do.
Full path:
admin/structure/types/manage/article/display
This allow all the articles to have a view of full content. You can leave the article default configuration and make something most meaningful to you like Post or News (content type) and give all the configuration that you want. All of this without code or plugins.
This will change it for all Article pages
jhalicea, this will work however your solution will change all Article pages, not just the front page.
It applies to all articles.
It applies to all articles. So create a new content type, call it "FrontPageContent" or something and do as suggested.
This didnt work for me at
This didnt work for me at all, but thanks for putting it up.
style it in the css
Hello,
I've removed the read more by placing the following in my theme css:
.front .node-readmore {
display: none;
}
Hope this helps!
Thanks, this was the easiest
Thanks, this was the easiest idea , I altered it a bit because in your solution not only the first "read more" is gone, all the "read more's" from the teasers below the intro text are gone to and I like to keep them.
So I came up with this solution:
1) create a custom content with the name "front-page" and give it a title but also put the title in the content area and style it with the usual "h1" tag
2) add this to your theme css:
.node-front-page .node-readmore,
.node-front-page .node-title {
display: none;
}
This removes the title (link) and the "read more" from the content type "front-page" and leaves all other content as it is.
Easiest way to remove read
Easiest way to remove read more link from the front-page is to Go to Configuration >> Site Information >> Default Front Page [Enter the node/nodeID]. It will show only the content in front page removing the read more link.
works for me...
this worked fine for me in a bartik subtheme...
Another way
This also works. Demonstrating how to hide read more, add a new comment link, and links:
Here is the solution !!
For Drupal 7
Add following code in template.php file of your active theme.
this will remove only 'read more' link but will not show full content,
To show full content,
1 - Go to: structure > content types
2 - under Basic page (assuming that the promoted page is a basic page) choose manage display.
3 - on the bottom click on "Custom display settings"
4 - uncheck all the other and enable full content.
It worked for me.
One short Solution
Go to Configuration -> Site Information --> standard website
If you assign any node it will remove the "read more" option when you simply create node and assign display in front page by using visibilty it will show front but there will be read more .. treasure is working in that case
Thanks
www.sushilworld.com
Solution
Here is what I did to solve the problem in Drupal 7:
Worked like a charm for me,
Worked like a charm for me, even without implement step 4 and 5. Thanks!
Display Suite
This is a great reason to use display suite in D7, and a lot of this functionality has gone into core in 8.
Read More Link module worked for me
Enable Read More Link module.
Go to Configuration>> Content authoring >> Read More Link
Check Remove Read More link from links section.
It worked for me.