Collapse global navigation with other theme options?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
User avatar
Don Chambers
Regular
Posts: 3611
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Collapse global navigation with other theme options?

Post by Don Chambers » Thu Feb 12, 2015 11:49 pm

Hey, we have this in bulletproof:

Code: Select all

$template_config_groups = array(
    THEME_COLORSET  => array('colorset', 'layouttype', 'jscolumns'),
    THEME_HEADER    => array('custheader', 'headerimage', 'headertype')
);
So, the theme options for colorset, layouttype, and jscolumns all collapse under the heading defined by THEME_COLORSET.

Is it possible to collapse global navigation under a heading as well?

User avatar
garvinhicking
Core Developer
Posts: 30015
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Collapse global navigation with other theme options?

Post by garvinhicking » Fri Feb 13, 2015 10:23 am

Hm, problaby by using the exact configuration key name of the global navigation. I'd have to check...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
Don Chambers
Regular
Posts: 3611
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Collapse global navigation with other theme options?

Post by Don Chambers » Sat Feb 14, 2015 12:18 am

I know I am close with this:

Code: Select all

$navlinks_collapse = array();
array_push($navlinks_collapse, 'use_corenav', 'amount');
for ($i = 0; $i < $template_loaded_config['amount']; $i++) {
	array_push($navlinks_collapse, 'navlink' . $i . 'text' ,'navlink' . $i . 'url');
}

$template_config_groups = array(
    THEME_NAVIGATION    => $navlinks_collapse
);
I have the "use_corenav", and "amount" collapsed, but I'm not getting navlink0text, navlink0url, etc into $navlinks_collapse... which suggests something is wrong with my loop... can I not use $template_loaded_config['amount'] when navigation is global? This all works just fine if the links are defined within the theme (not global).

User avatar
Don Chambers
Regular
Posts: 3611
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Collapse global navigation with other theme options?

Post by Don Chambers » Sun Feb 15, 2015 8:19 pm

$template_loaded_config['amount'] simply doesn't work here. Anyone have a better suggestion?

User avatar
garvinhicking
Core Developer
Posts: 30015
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Collapse global navigation with other theme options?

Post by garvinhicking » Mon Feb 16, 2015 11:28 am

If you can create a github issue and assign it to me, I'll try to inspect this in a few days so I don't forget it?
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
Don Chambers
Regular
Posts: 3611
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Collapse global navigation with other theme options?

Post by Don Chambers » Mon Feb 16, 2015 11:37 pm

Done.

Post Reply