By Amirsan on
is there a way to remove the "Welcome to your Drupal installation!' WITHOUT promoting content to first page? I just want a block to appear there on the top, no specific post promoted to front page.
Thanks
is there a way to remove the "Welcome to your Drupal installation!' WITHOUT promoting content to first page? I just want a block to appear there on the top, no specific post promoted to front page.
Thanks
Comments
That welcome message is
That welcome message is hardcoded by default when there isnt any content. (as an aside we have tried in the pas to "whitebox" drupal and remove these brnadings by defaiult but that hit a roadblock iirc) but you can easily install the views module and create a view for the frontgpage that mimics its functionality perfectly. then you can set the "empty text" of that view to anything youd like and assign that page to the "frontpage" of your site in Admin > site config > site information. Hope that helps.
works perfect!
what i did was this:
1) create a view
in the view...
2) create a page display
3) set up filters, fields etc
4) add argument: Global: Null > Action to take if argument is not present: Display empty text
5) edit Page settings > path > node
(so the path is http://localhost/node ie. your home page)
This worked for me.
This worked for me.
add argument: Global: Null > Action
How do you add the argument in a views setting?
another option using inbuilt views
Just Go to list of view lists, enable the front page view which is coming by default .
Edit the front page view, set the permission under Page settings from None to Permission Permission | View published content .
Go to site information from admin menu, set the front page to view page path.
See this link: http://www.krishnakumargupta.com/removing-welcome-drupal-message-without...
Hope it will work for you also.
Cheers.
Best technique
I tried this technique on Drupal 7 and I think it's the best way/method without touching the core. Thanks!
Edit template.php in drupal 7
In drupal 7, if you have your own theme, you can edit your theme's template.php and add this to hook_process_page implementation .. (you can clone the default theme to sites/all/themes and edit it)
if (drupal_is_front_page()) { $variables['title']=""; }I tried working on a cloned theme from bartik (the default drupal 7 theme) and it worked fine.
Please note that you will need to rename the new theme folder in /sites/all/themes/ and the info file inside and then replace all occurrences of the old name in template.php (Thanks to this post)
Full detail for newbs
I, like many others, have been searching long for an answer to this problem that is not a css hack or views trickery and have finally found the answer here. For those who are pasting this code verbatim into their template.php files and having no results the following clarification will be helpful:
As you can see you have to add another line to the above to make it work. (The hook_process_page thingy mentioned above.) THEME-NAME must be replaced with your theme's name.
It works with Drupal 7.
hook_preprocess_html
hook_preprocess_html
Drupal 7 !
use Drupal function to set title
Rather than setting title directly, I recommend using the drupal_set_title() function. Generally the themes I use have a page.preprocess.inc but this code could work in the template.php file too:
The above code assumes that it is within the php code so no need for the ?php tags
I tried this technique but my
I tried this technique but my theme must not have liked the code because I just got the blank white page of doom. Does it need to be in a specific place?
Thanks.
Did we forgot good old tpl files?
In case folks land here on a Google search...
The easiest way to accomplish this in Drupal 7 is simply cloning your page.tpl.php file in your custom or sub-theme and calling it page--front.tpl.php (Note the double dash).
Find this code:
Kenny S.
Follow me on Twitter
Or use hook_page_alter()
Or use hook_page_alter().
Thanks a lot
It did the trick for me thank you !