178 Posts
Jeka
9 years ago
21
Topic

Hi.

In my site i have this tree of categories

News

- World

- Asia

- Europe

I use list&seach for list items from these categories.

For each of these categories i have menu item ( also list&seach ) with live value based on category id.

In main news category "News" menu item i got links like:

news/page1.html - assigned to World category

news/page2.html - assigned to Asia category

news/page3.html - assigned to Europe category

In "World" "Asia" "Europe" menu item i got links like:

news/world/page1.html

news/asia/page2.html

news/europe/page3.html

But i want to have in main menu item "News" links like:

news/world/page1.html

news/asia/page2.html

news/europe/page3.html

This problem based on selected menu item in links options.

There is solution from PulsarInformatik

http://www.pulsar-informatique.com/telechargements-gratuits/dynamic-view-link-plugin

but it have some limitations that were discussed in this topic.

http://www.seblod.com/community/forums/fields-plug-ins/new-plugin-dynamic-menu-link-plugin

Some maybe community or devs have better solution? 

Get a VIP membership
9 years ago
2
Level 1

Hello Jeka,

you can archive that with a restriction plugin "Field"


In the item view, you set 3 fields on which you set the link differently :

  • Field 1 : Link based on the menu item news/world/
  • Field 2 : Link based on the menu item news/asia/
  • Field 3 : Link based on the menu item news/europe/


Then you add a restriction "Field" on each fields : 

  • Field 1 : displayed only if the category is "world"
  • Field 2 : displayed only if the category is "asia"
  • Field 3 : displayed only if the category is "europe"

Be sure to have the field category in your item view.


Best regards.

Lionel

178 Posts
Jeka
9 years ago
0
Level 2

Hi and thanks. But i not use item view. 

Did you mean list view ?

Jeka.

332 Posts
Kenneth
8 years ago
0
Level 2

Hi Lionel,

I'm trying my best to get this working, but it just keeps on selecting the link in the highest field in item view.

9 years ago
2
Level 1

Hi Jeka,

item view or list view are the same thing.

You can use what I describe in the list of seb_table, like in the item view of any other list template.

regards.

Lionel

178 Posts
Jeka
9 years ago
1
Level 2

Hi Lionel.

Big thanks for your answer. 

But as i can see it is not very flexible way to do what i need. For now i have 3 language * 3 categories.. so there are already 9 menu items. 

In the future i will have much more categories and for all of them i have to create separate fields to get right links.

And because i use custom list template i will have to use "if / else" for all of these fields in the code.

Am i right? 

Maybe there is some other way to do it more "flexible"?

Jeka

8 years ago
0
Level 3

Hello

This is why we developped the dynamic menu link plugin :)

cyril

310 Posts
ricco
8 years ago
0
Level 1

+1

17 Posts
erickmines
7 years ago
2
Level 1

"dynamic menu link plugin" solves my problem.

1283 Posts
Bucklash
7 years ago
1
Level 2

Hi erikmines

Could you do a tutorial on how you used it?

Be good to see

Bucklash

7 years ago
0
Level 3

Hi

Please read here


thanks


cyril

17 Posts
erickmines
7 years ago
2
Level 1

Look at this video. I showed how the plugin works on a site I'm working right now:

https://www.youtube.com/watch?v=WDHH_hqJUSE

7 years ago
1
Level 2

Thanks, I added the link in the plugin download page

cyril

1283 Posts
Bucklash
7 years ago
0
Level 3

Nice

17 Posts
erickmines
7 years ago
0
Level 1

Ohh thank!

34 Posts
Index
6 years ago
4
Level 1

Hi Cyril,

the plugin throws some errors for me. I can't understand, why an important feature like this is not core.

Notice: Undefined property: stdClass::$bool4 in C:\xampp\htdocs\xxy\plugins\cck_field_link\content_menu_dynamic\tmpl\edit.php on line 82
Notice: Undefined property: stdClass::$bool3 in C:\xampp\htdocs\xxy\plugins\cck_field_link\content_menu_dynamic\tmpl\edit.php on line 84
Notice: Only variables should be assigned by reference in C:\xampp\htdocs\xxy\plugins\cck_field_link\content_menu_dynamic\tmpl\edit.php on line 91
Notice: Undefined variable: options in C:\xampp\htdocs\xxy\plugins\cck_field_link\content_menu_dynamic\tmpl\edit.php on line 182
Notice: Undefined variable: options in C:\xampp\htdocs\xxy\plugins\cck_field_link\content_menu_dynamic\tmpl\edit.php on line 183

6 years ago
3
Level 2

Sorry, these are just notices :)

Cyril

34 Posts
Index
6 years ago
2
Level 3

Ok - well, if notice, error, message, note, mark, report, signal -> i don't really care about the nomenclature, i try to get the plugin to work. :p

Those notices pop up in the backend, while there are also around 10 notices per search result in the frontend.

4229 Posts
Kadministrator
6 years ago
1
Level 4

Set your error reporting level in Joomla to a lower level until Cyril fixes the plugin

34 Posts
Index
6 years ago
0
Level 5

I did, but i still can't get the plugin to work - maybe i do something wrong. It was for testing purposes anyway, but i still think this is a feature that should be in SEBLOD core - because without, you can't do a functional site search within multiple content types.

6 years ago
1
Level 1

Hi

We uploaded a newer version of the plugin here

we use it regularily on many sites.

We added many new things in this version such as the possibility to write custom code but you can still sue the visual interface. to avoid the storage issues you can store the rules in a json format either.

the multilanguage has also been improved and you can use regexp for better performances.

Cyril

34 Posts
Index
6 years ago
0
Level 2

Thank you Cyril! It works! I still get the notices (maybe because of the storage?), but with error reporting on 'none' it's working fine.

Still my humble opinion: this should be core (may the SEBLOD team consider).

Get a VIP membership