Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
menu system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2007 at 14:50 UTC
Updated:
1 Jul 2007 at 15:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
kkaefer commentedOk, this doesn’t happen for
user/1, because the page title is set somewhere else and not taken from the menu system. However,admin/content/typesvs.admin/content/types/listis a good example.Comment #2
chx commentedThis patch restores all behaviour mostly -- if you have an object for the default tab then it points to itself otherwise it's the parent.
Comment #3
kkaefer commentedThere are some glitches:
When you’re on a non-default tab:
admin/content/types/listinstead ofadmin/content/types)admin/content/typesinstead ofadmin/content/types/add)Comment #4
ChrisKennedy commentedHere is a patch from chx via IRC - I tested it and it correctly fixes default tab behavior. I had noticed some problems that popped up within statistics.module (http://drupal.org/node/143081).
Comment #5
dries commentedCan we add some code comments please? Thanks! :)
Comment #6
pwolanin commentedI thought I fixed the problem with the Help module in an earlier patch?
(from menu.inc - look at the last line)
Comment #7
ChrisKennedy commented@Peter - this patch fixes the default tab link, not the help.
Comment #8
pwolanin commentedI need to work through this more, but I don't think this code is going to work at depths below the first level of local tasks.
Comment #9
pwolanin commentedthis isn't maximally efficient, but seems to work. I'll post some additional code to use for testing as well.
Comment #10
pwolanin commentedok, trying to get around the upload restrictions ;-)
rename the attached file to tabtest.zip and unzip it. Inside is a small test module and a replacement for the page.tpl.php of garland. This version just shows tabs at depths below 0 and 1.
Substitute the page.tpl.php and enable the module. Visit /tabtest and /tabtest/6 (or any arg)
Comment #11
pwolanin commentedwith additional/corrected code comments.
Comment #12
chx commentedSteven reviewed the patch and complained that default tasks within default tasks does not point high enough. That's solved by a nice empty for loop which climbs up until it finds a non default local task. Also, he mentioned that we should not show single tabs. Fixed, too.
Comment #13
pwolanin commentedSince this patch stores the full item in the $items array, it seems the $tab_parent array is unused and can be eliminated.
Comment #14
pwolanin commentedusing chx's logic to find the right href for local tasks, but rewrote the code and re-tested.
Comment #15
flk commentedyeap this patch works fine ;)
tested it on both blocks and the little tab module you gave...works great.
Comment #16
gábor hojtsyAll seems to be fine here. How does this affect the help use case and pwolanin's workaround in particular? It seems this patch should remove that.
Comment #17
gábor hojtsyDiscussed the issue with chx on IRC, and the help issue is different, will be addressed in another patch.
Done another review and it looks good, so committed.
Comment #18
(not verified) commented