Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Change sub-tab ordering?
My jmd_dashboard tab, “Welcome,” is being displayed last under the “Content” tab. Is there a way I can move it to first place, all the way to the left?
Offline
Re: Change sub-tab ordering?
Can you edit the plugin code where it registers with “Content” and change it to “Home”?
Home is a new TL tab, but it only displays if there is something there. If jmd_dashboard is the only sub tab, it should display by default when you click on home. I think – in theory. I’ve not tried it out yet :)
Last edited by maverick (2011-03-15 16:58:09)
Offline
Re: Change sub-tab ordering?
I tried changing it to “home” (assuming no caps since “content” didn’t have them) inside the jmd_dashboard plugin, but that didn’t do anything — except that “Welcome” no longer shows up under “Content.”
Would love to know how that “Home” tab can be drawn out of its cave!
Offline
Re: Change sub-tab ordering?
Does this help?
There was a discussion on what to call the new tab, and I think “home” was settled on, but it may be coded as start or start_tab. And you have to add privileges for it to show.
Last edited by maverick (2011-03-15 19:59:53)
Offline
Re: Change sub-tab ordering?
Yes! That helps very much. Solved my problem. :-)
Here’s the beginning of the jmd_dashboard plugin code, with the changes:
if (txpinterface == 'admin')
{
add_privs('jmd_dashboard', '1,2,3');
add_privs('tab.start','1,2,3,4,5,6');
register_tab('start', 'jmd_dashboard', 'Welcome');
register_callback('jmd_dashboard', 'jmd_dashboard');
ob_start('jmd_dashboard_tab');
Note that it will call your tab “Home” even though the code says “start.” Which is OK by me but just a bit unexpected.
Here is the result, caught in the wild (modified Air theme):
That poor lonely Welcome tab… :-)
Offline
Re: Change sub-tab ordering?
You should be able to get rid of the “Welcome” by changing one line:
register_tab('start', 'jmd_dashboard');
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Change sub-tab ordering?
Hm. That leaves an undefined variable error. I’d be interested to know how to remove the Welcome though.
Offline
Re: Change sub-tab ordering?
What if you keep the apostrophes but leave content blank?
register_tab(‘start’, ‘jmd_dashboard’, ‘’);
Offline
Re: Change sub-tab ordering?
Looks like I get a narrow blank tab if I do that. :-)
Offline
Re: Change sub-tab ordering?
Are you using the Txp’s default theme?
When I tested it, the only thing that showed is the active tab indicator, which is set in the admin theme.
Offline
Re: Change sub-tab ordering?
Ah, that’d be it then — I’m using Air, so I’ll have to take a look at that code. Thanks.
Offline
Pages: 1