Base Item not working
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
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
by ferpa3000
Please Log in or Create an account to join the conversation.
Hi
if you use a native joomla menu module, do you have the same behavior or not ?
CEd
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.
No. With the native joomla menu module it works correctly.
by ferpa3000
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Hello CEd, just reminding you about this problem.
by ferpa3000
Please Log in or Create an account to join the conversation.
Hi
please edit the file modules/mod_accordeonck/helper.php
line 49 to 60
replace it with
then check if it works
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;
}
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