skin_menu menu_unique field

SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Looking at the skin_menu and adding a link via the ACP, I can't create two CustomEntry links with the same link as the link fills both the menu_unique and menu_action fields.

If I wanted to link to (for example) jamroom.net in both a header menu and footer menu I wouldn't be able to do that using skin_menu.

I'm considering making a separate menu support module for my skin, but if I can use the core skin_menu I guess that would be the best option. Wondering though, why don't jrElastic and jrNova use the skin_menu to fully control the whole menu (ie menu control with no template editing)? Looks like it might be possible from looking at the code.

Thanks


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 06/19/14 07:06:12AM
brian
@brian
11 years ago
10,149 posts
This is likely just a case of the skin_menu option being released some time after the skins, and we just have not updated the skins to work with it.

I will check out the skin menu setup though and see if there's something I can do to make it more flexible.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Thanks Brian. I haven't looked very far into it, but a parent_category field would possibly make it much more flexible (although it could also be that I could manage that with a function name which returned another category, not sure if there are checks on what the function returns, seems to just be being used for counts at the moment).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
I've just noticed a possible bug:

I created a menu item with the same link, and saw a white page with a CRI error about that.
Returning to /core/skin_menu in the ACP I try to create a new item by adding a new menu label and get the error:
Query Error: Duplicate entry 'CustomEntry-' for key 'menu_unique'

The item doesnt have all its data in the table:
skin_menu-table.png
skin_menu-table.png  •  111KB




--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 05/13/14 10:05:29AM
brian
@brian
11 years ago
10,149 posts
So you've created a new menu item, but used the same "URL" value? I will check it out.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,149 posts
I see this as well and will get it fixed.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,149 posts
I've got this fixed up for Core 5.1.43 - it will now check the entry before trying to create it. I've also updated the unique SQL key so it includes the menu_category - this way you can have the same Linked URL as long as it is in different categories (i.e. the top "user" category and a custom "footer" category if you wanted).


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Thanks Brian, I'll give that a try tomorrow.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
11 years ago
10,149 posts
SteveX:
Thanks Brian, I'll give that a try tomorrow.

I don't have it released yet - I've a couple other things I'm looking at here but will try to get it online tomorrow morning.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
No worries or hurry. It isn't holding me up, I can use skin_menu as it is for the footer menus.

I think I'm going to need a parent_category field for adding mega menu options to the header menu, but I should be able to add the field to the menu table on skin install and add the form field from a listener, right? (I haven't tried that with a non-datastore table yet)

I'm curious, is there a reason why the skin menu hasn't been made as a datastore module?


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 05/13/14 12:53:24PM
brian
@brian
11 years ago
10,149 posts
SteveX:
No worries or hurry. It isn't holding me up, I can use skin_menu as it is for the footer menus.

I think I'm going to need a parent_category field for adding mega menu options to the header menu, but I should be able to add the field to the menu table on skin install and add the form field from a listener, right? (I haven't tried that with a non-datastore table yet)

I'm curious, is there a reason why the skin menu hasn't been made as a datastore module?

while the DS is super handy when you have a lot of entries, for a small amount of entries (say under 100) it's a bit overkill, and for something that is going to be run on every single page view, the "overhead" is lower with a single table. It certainly COULD be done in DS, but since we know the fields we will be using for our menu entries a fixed table offers better performance.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Thanks, that makes more sense now.

I am wondering about that parent category though, specifically for a "mega menu" (a full width panel dropdown when the top level menu item is clicked - contains several menu categories, and/or ranking calls).

The reason I like the datastore type module is that it is so darn flexi, and that's pretty sexy. Should I be more worried about performance? Oh performance, if only.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags