8 years ago
3
Topic

I'm trying to create a list of items that share the same parent menu item, but just can't quite figure out how to do it.

Thought it might be something to do with using a Jform Menu Item field, but can't make it work. I've tried making many different settings in the search form (live values, match, stage), but so far, nothing! 

Can anyone help here please?

Get a Book for SEBLOD
4229 Posts
Kadministrator
8 years ago
2
Level 1

What do you mean by "share the same parent menu item" ? Articles are not directly linked to menus, menus only point to article or multiple articles, but you can have multiple menus pointing to the same article. 

Only way to do it would be to add parent menu field to the article (e.g. you can use select dynamic for this or simple text field where you put in menu id), save each article with this new field and then search by this field.

8 years ago
1
Level 2

Hi Klas, thanks for replying.

Sorry if I wasn't clear. What I meant was that if I had this menu structure:

-item-1
--sub-item-1a
--sub-item-1b
--sub-item-1c
-item-2
-item-3

And each Sub Item is a single article, then I'd like to have "Item 1" page display a list of preview boxes for each Sub Item. I have managed to get the list to display each item that exactly matches a menu item, but not all the Sub Items that have "Item 1" as their menu parent..

With Drupal I am able to use Contextual Arguments to match parts of the url which would do the job here. As the JForm Menu Item field does not appear to allow depth or hierarchy I can't see a way of achieving what I want, without making more fields as you suggest, which means users have to set the menu twice and if things moved you've got to go back and edit the article as well.

Also I wanted to make one list and use it on different pages to save time.

4229 Posts
Kadministrator
8 years ago
0
Level 3

Some ideas

a) simply use joomla menu module and set it to display levels 2 to 3 (or whatever your menu depth is)- so called split menu mode. But this would give you only links to submenus, without preview.

b) add some search sql to your search to join menu table with right conditions using

https://www.seblod.com/store/extensions/922

or 

https://www.seblod.com/store/extensions/19157

Get a Book for SEBLOD