Base Item not working

Base Item not working was created by ferpa3000

Posted 6 years 4 months ago #46445
Hello!
I love this extension, but I found a bug that is really annoying.

The base item selection is not working as it should. As I understand, the base item should show only the marked items on the selected pages. But instead, it shows the selected marked items plus the items relative the active page.

For instance, this is a a menu from a site I've made: (vivacitas.com.br)

SERVIÇOS (parent - this is set as base item and start level 2. It shows this menu at all pages, that is ok)
- Coaching
- Consultoria
- Gestão de Pessoas
- Recrutamento e Seleção
- Treinamentos e Programas
- Mapa Sistêmico

BLOG (parent)
- Carreira
- Consultoria e Treinamentos
- Conflito de Gerações
- Etiqueta Empresarial
- Desenvolvimento de Equipes

Now, if I visit the "Coaching" page, under SERVICOS, the result is correct. The menu shows only the links under SERVICOS.
But, when I visit a page that is under BLOG, it show both the items under SERVICOS and BLOG.

If I visit the page "Carreira" this is what the menu shows:
- Coaching
- Consultoria
- Gestão de Pessoas
- Recrutamento e Seleção
- Treinamentos e Programas
- Mapa Sistêmico
- Carreira
- Consultoria e Treinamentos
- Conflito de Gerações
- Etiqueta Empresarial
- Desenvolvimento de Equipes

It just adds the current page relatives to the menu.

Can you help me figure this out?
Thanks.
Fernando

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Base Item not working

Posted 6 years 4 months ago #46447
Hi
if you use a native joomla menu module, do you have the same behavior or not ?
CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by ferpa3000 on topic Base Item not working

Posted 6 years 3 months ago #46500
No. With the native joomla menu module it works correctly.

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Base Item not working

Posted 6 years 3 months ago #46504
please remind me next week, I will check that

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by ferpa3000 on topic Base Item not working

Posted 6 years 3 months ago #46598
Hello CEd, just reminding you about this problem.

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Base Item not working

Posted 6 years 3 months ago #46727
Hi
please edit the file modules/mod_accordeonck/helper.php
line 49 to 60
Code:
if (($start && $start > $item->level) || ($end && $item->level > $end) || (!$showAll && $item->level > 1 && (!in_array($item->parent_id, $path) && !in_array($item->parent_id, $pathActive)) ) //|| ($maxdepth && $item->level > $maxdepth) || ($start > 1 && !in_array($item->tree[$start - 2], $path) && $start > 1 && !in_array($item->tree[$start - 2], $pathActive)) ) { unset($items[$i]); continue; }
replace it with
Code:
if (($start && $start > $item->level) || ($end && $item->level > $end) || (!$showAll && $item->level > 1 && !in_array($item->parent_id, $path)) || ($start > 1 && !in_array($item->tree[$start - 2], $path))) { unset($items[$i]); continue; }

then check if it works

Joomlack Webmaster and Developer

Last Edit:6 years 3 months ago by ced1870
Last edit: 6 years 3 months ago by ced1870.

Please Log in or Create an account to join the conversation.

Time to create page: 0.680 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1049 guests and no members online