$template_config_groups not including type="content"
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
$template_config_groups not including type="content"
Ive just noticed that when template options are collapsed under a heading via $template_config_groups, template options defined as 'type' => 'content' are not included, and remain outside the collapsed section. Is this by design or oversight?
=Don=
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: $template_config_groups not including type="content"
Content-Types follow some own kind of logic, and I think there was a reason why this is handled differently. Maybe I'll remember, but for the time being I'm afraid they won't wrap then...Don Chambers wrote:Ive just noticed that when template options are collapsed under a heading via $template_config_groups, template options defined as 'type' => 'content' are not included, and remain outside the collapsed section. Is this by design or oversight?
# 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/
# 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/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: $template_config_groups not including type="content"
That's a shame, as they are very useful for displaying additional info and/or help messages.garvinhicking wrote:Content-Types follow some own kind of logic, and I think there was a reason why this is handled differently. Maybe I'll remember, but for the time being I'm afraid they won't wrap then...
=Don=
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: $template_config_groups not including type="content"
Hi!
Seems I talked bullshit. I just tested it in the bulletproof config.inc.php, added this to the config array:
and then added it to the first group:
and the "Hello" output i s there in the colorset group...?!
Regards,
Garvin
Seems I talked bullshit. I just tested it in the bulletproof config.inc.php, added this to the config array:
Code: Select all
array(
'var' => 'contenttest',
'name' => 'Contenttest',
'type' => 'content',
'default' => '<b>Hello!!!</b>',
),
Code: Select all
$template_config_groups = array(
THEME_COLORSET => array('colorset', 'userstylesheet', 'layouttype', 'jscolumns', 'contenttest'),
THEME_HEADER => array('custheader', 'headerimage', 'headertype')
);
Regards,
Garvin
# 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/
# 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/
Re: $template_config_groups not including type="content"
Well that way this is working well, because it is static, we know it. You can even go via 'custom'.
But we need (see other thread) the vars of $template_loaded_config passed to $template_config_groups. In there or on its way 'content' items gets lost somehow, as not added to the collapsing part and placed outside. (As I said, clone that "function or whereever it is" or even change the core to be not that strict.)
But we need (see other thread) the vars of $template_loaded_config passed to $template_config_groups. In there or on its way 'content' items gets lost somehow, as not added to the collapsing part and placed outside. (As I said, clone that "function or whereever it is" or even change the core to be not that strict.)
Last edited by Timbalu on Sun May 13, 2012 8:44 am, edited 1 time in total.
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: $template_config_groups not including type="content"
Type content seems to work when it is one of the explicitly listed template options, ie: 'My Heading' => array('colorset', 'userstylesheet', etc). it does not work for content types when part of an array, such as:
The very fact that there are multiple items in this type of template config is why content type is even more important when these items are collapsed under a common heading.
Code: Select all
$navlinks = array();
for ($i = 0; $i < $template_loaded_config['amount']; $i++) {
$navlinks[] = array(
'navlink'=>$template_loaded_config['navlink' . $i . 'navlink_intro',
'title' => $template_loaded_config['navlink' . $i . 'text'],
'href' => $template_loaded_config['navlink' . $i . 'url']
);
$template_config[] = array(
'var' => 'navlink' . $i . 'navlink_intro',
'type' => 'content',
'default' => 'Header for navlink #' . $i ,
);
$template_config[] = array(
'var' => 'navlink' . $i . 'text',
'name' => NAV_LINK_TEXT . ' #' . $i,
'type' => 'string',
'default' => 'Link #' . $i,
);
$template_config[] = array(
'var' => 'navlink' . $i . 'url',
'name' => NAV_LINK_URL . ' #' . $i,
'type' => 'string',
'default' => '#',
);
}
=Don=
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: $template_config_groups not including type="content"
Hi!
Guys, I don't get any of your replies. Please send me a full example config.inc.php (or, even better, one that is reduced to the problem not working) so that I can see what you're having problems with.
Regards,
Garvin
Guys, I don't get any of your replies. Please send me a full example config.inc.php (or, even better, one that is reduced to the problem not working) so that I can see what you're having problems with.
Regards,
Garvin
# 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/
# 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/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: $template_config_groups not including type="content"
Garvin - when using "static" template options with var type "content", everything works fine... just as you proved. They do not show in the collapsed header when the var type 'content' is part of an array, as in my example above (ie, a navlink parameter is type 'content', in addition to navlink text, url, etc.
However, I think I solved the problem to my personal satisfaction as explained here: http://board.s9y.org/viewtopic.php?f=5& ... #p10430728
However, I think I solved the problem to my personal satisfaction as explained here: http://board.s9y.org/viewtopic.php?f=5& ... #p10430728
=Don=