By dnorthcott on
I have found many posts on how to remove tabs in druapl 5.x and lower, but how would i remove the 'view' tab in drupal 6.x?
cheers
I have found many posts on how to remove tabs in druapl 5.x and lower, but how would i remove the 'view' tab in drupal 6.x?
cheers
Comments
anyone? been searching
anyone? been searching forever to find a drupal 6 solution
If you have found what I
If you have found what I have found, it still works for d6 for me:)
love, light n laughter
blogid.net
love, light n laughter
geez.
c'mon.
I was looking for the same
I was looking for the same and I found a solution. I post it here just in case someone else needs it too.
With Drupal 6 hook_menu_alter (http://api.drupal.org/api/function/hook_menu_alter/6) you can disable the callback for view tab:
And then you can override user default tab for using your own with hook_menu:
I have been trying to do this
I have been trying to do this for weeks and so far the above has gotten me the furthest. I have successfully removed the view tab, but I can't get it to redirect the user. Could you tell me how I would forward the user to user/%user/edit ? It would be greatly appreciated.
I hid both view and edit tabs
I hid both view and edit tabs with css and then redirected users from user/* to user/*/edit.
in the theme's style.css:
.logged-in.page-user .tabs {
display: none;
}
in the custom module:
create redirectprofile folder in sites/all/modules and copy these two files
redirectprofile.info
; $Id$
name = Redirect profile
description = Redirect users from user/* to user/*/edit.
core = 6.x
version = 6.x-1.0
redirectprofile.module
a concern
This works good. I tried your code. Thanks for that. I have a concern. I want to access other user profiles. So I am looking at something like, When the logged in user clicks on 'My Account' he has to be redirected to user->edit page. When the same user clicks on some other username, then he should be able to see the other users profile. How can this be done?
Thanks,
Betty
replace w/ <?phpfunction
replace w/
not removing View tab
This is not removing the View tab from 'My Accounts' page. I added the class you said in my style.css but it is not working. Any reasons?
perhaps a simple solution?
i just created a page-user.tpl.php and removed the tabs php? seems to work fine?
Geez, this post is forgotten,
Geez, this post is forgotten, sorry. When I can find the source, I'll surely place it here. So here is what I have found and done, it's done through template layer:
Create a function in your template.php:
Then inside your preprocess_page, create one if you don't have it:
Place the removal code with conditions as you please:
Perhaps there is a better solution, such as module solution above.
@Andrew Jamieson, removing the tabs directly from page.tpl will simply remove them even from admin. So be careful :)
love, light n laughter
I got it to work with this
I got it to work with this
I don't know why, but I would get an error displayed at the top of the page if I used the code above, I removed the & and the error went away.
subcribing.
subcribing.
All possible solutions in one
All possible solutions in one place
http://drupal.org/node/68792
------
GiorgosK
Web Development