@Lincoln said:
Selectively answering the last part: yes, sort works regardless of template language. That happens in the framework before the view is rendered.
I Can corroborate that menu sort does not work on a mobile tpl or regular tpl. It works on all my php themes including mobile, but does not work on tpl template .
and in a php based theme the config statement . will not sort naviagation menu items added via addlink,
nor will it add the select class to those Navigation Menu items that were added via addlink in a plugin, it will however add the Active class to menu items in dashboard panel
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yes they will sort as long as you add the link in the statement where you want it to show.
I just did an experiment, I replaced all the Banner in the embed friendly tpl and css for Menu and I got to sort a couple of them.The sign out link and the dashboard link .
I think this must have something to do with it. The order that they appear in the theme hooks is not how it shows, so something is getting sorted
are you on a tangent - or are you specifically talking about the config statement, which I am talking about, that doesn't appear to sort things in a tpl file nor does it sort things added via addlink in a plugin, nor does it add a Select class when item is selected if the item is not one of the standard home dashboard activity, etc.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Specifically the config statement. Yes and yes. You can also test your theory by using the categories drop down plugin which also does not work on tpl it adds the categories in no particular order.
I do recall removing the links added by plugins to the menu and coding them by hand in my master php or the theme hooks. Because of this problem. Which seems to apply to sorting modules as well....
had no impact on ordering for my test in vanilla 2.1rc1
I don't want to de-rail the whole discussion, just thought I would post some of the issues related to menu selection and ordering in tpl themes and with plugin additions of addlinks, if it is something you guys think should work.
should I file on github?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yea tried that too, also other combos . I did change the tpl and theme hooks to not use Banner and use Menu that seems to help a bit also some other things work on the menu. Why is it called Banner in the mobile and the embed friendly ?
I am sure this is related to how smarty compiles the stuff.
Comments
Selectively answering the last part: yes, sort works regardless of template language. That happens in the framework before the view is rendered.
sort via config statement: ?
$Configuration['Garden']['Menu']['Sort'] = array(Activity, 'Discussions', 'Conversations', 'Applicants', 'Dashboard');
doesn't seem to work for me., can someone show me a screenshot of a sorted menu with a default.master.tpl theme.
and the the config statement that worked sorting the menu displayed in your screenshot.
just to humor me.
apparently no one can prove it .
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I Can corroborate that menu sort does not work on a mobile tpl or regular tpl. It works on all my php themes including mobile, but does not work on tpl template .
$Configuration['Garden']['Menu']['Sort'] = array('New Discussion', 'Dashboard', 'Gallery', 'Games', 'Activity', 'Conversations', 'Discussions', 'Categories', 'Questions', 'Applicants', 'User', 'EditProfile','Inbox','Home', 'Mobile View', 'VChat', 'SignIn', 'SignOut', 'Contact','Gallery','Games', 'Privacy');
I suspect it is because the menu is not the menu it is called banner ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
thank you for corroborating.
and in a php based theme the config statement . will not sort naviagation menu items added via addlink,
nor will it add the select class to those Navigation Menu items that were added via addlink in a plugin, it will however add the Active class to menu items in dashboard panel
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yes they will sort as long as you add the link in the statement where you want it to show.
I just did an experiment, I replaced all the Banner in the embed friendly tpl and css for Menu and I got to sort a couple of them.The sign out link and the dashboard link .
I think this must have something to do with it. The order that they appear in the theme hooks is not how it shows, so something is getting sorted
these are the links I added in the themehooks
They do not appear in this order however...yea something is funky with the sort
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
are you on a tangent - or are you specifically talking about the config statement, which I am talking about, that doesn't appear to sort things in a tpl file nor does it sort things added via addlink in a plugin, nor does it add a Select class when item is selected if the item is not one of the standard home dashboard activity, etc.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Specifically the config statement. Yes and yes. You can also test your theory by using the categories drop down plugin which also does not work on tpl it adds the categories in no particular order.
I do recall removing the links added by plugins to the menu and coding them by hand in my master php or the theme hooks. Because of this problem. Which seems to apply to sorting modules as well....
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
yes there are workarounds. doesn't change the issue at hand though.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Try
$Configuration['Modules']['Vanilla']['Menu']
?@Lincoln
had no impact on ordering for my test in vanilla 2.1rc1
I don't want to de-rail the whole discussion, just thought I would post some of the issues related to menu selection and ordering in tpl themes and with plugin additions of addlinks, if it is something you guys think should work.
should I file on github?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yea tried that too, also other combos . I did change the tpl and theme hooks to not use Banner and use Menu that seems to help a bit also some other things work on the menu. Why is it called Banner in the mobile and the embed friendly ?
I am sure this is related to how smarty compiles the stuff.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Sure, can't hurt. If you happen to know if it happens in master/2.2 also that'd be helpful.
I am not convinced that's actually a bug yet. I dunno how that SQL is getting built on that site, but it's not like that in core afaik.
Sounds like a good issue to file. Can get looked at for 2.1.1 at least.