Navigation - Query Link doesn't work?

Topics: Customizing Orchard
Aug 18, 2012 at 3:25 PM

On the navigation page I inject a menu item by Query Link Add button. But this item doesn't appear on the menu no matter where I place it.

Adding menu items through Content Menu Item, Custom Link works fine.

And if I create a projection on the same query and configure the projection to be on the menu then I see it and it works.

Did I missed anything with Query Link?

Coordinator
Aug 20, 2012 at 6:52 AM

Actually, I'm having a hard time understanding what you're attempting and expecting. Can you explain?

Aug 20, 2012 at 3:44 PM
Edited Aug 20, 2012 at 9:58 PM

I just want to inject a menu item into the existing menu. I can do it using Content Menu Item Add or Custom Link Add buttons.

But if I use Query Link Add button then that item is added to the menu (on Navigation page) but it is NOT shown on the resulting page (html).

I've just noticed that the item is added to the menu in the form (Query Link) without title. If you click on edit for that item you go to the Edit Query Link page but it is empty. So actually this Query Link doesn't work for me.

It looks like a bug.

Aug 21, 2012 at 5:57 PM

Reistalled the system. There is a title now but still not showed on the web page.

Coordinator
Aug 22, 2012 at 8:24 AM

If you think it's a bug, file it, but please include very precise repro steps.

Aug 23, 2012 at 11:23 AM

I just want to ask the community:

Anybody could work with Navigation - Query Link???

Aug 25, 2012 at 12:29 PM

Nobody?

Coordinator
Aug 26, 2012 at 7:56 AM

Yes. Do you have a specific question?

Aug 26, 2012 at 2:05 PM

I found myself that if you have a clean installation of Orchard then all what I am talking about is working fine but the installation with a few modules added has the problems.

Now I have 2 suspicions:

1. A third party module affects Navigation behaviour.

2. Or Navigation module behaves badly in some situations. It is based on the fact which I've met with Alias UI module. If you you delete some aliases through UI then the module doesn't delete them from Alias_AliasRecord table what causes the error when you want open aliases list again. So my suspicion is that Navigation likely behaves similar when you delete menu items. If I have time I will check a bit later.

Coordinator
Aug 27, 2012 at 6:35 AM

If you have repro steps, please file a bug.

Sep 14, 2012 at 3:11 PM

I eventually found the reason for such a behavior. It is dead simple. If a content type under your query doesn't contain Title part then all Query Links will be invisible in the menu.

Aug 25, 2014 at 11:56 AM
Gorizon47 wrote:
I eventually found the reason for such a behavior. It is dead simple. If a content type under your query doesn't contain Title part then all Query Links will be invisible in the menu.
This indeed solved the problem!

Alternatively, if your part already contains some sort of native name, implementing ITitleAspect in your part enables the menu.