Forum

JiFile for Joomla!

JIFile
JiFile is a component for Joomla! that allows you to index file contents (PDF, DOC, etc..) to perform searches in them.

Learn more...  Demo

JoomPhoto Mobile

JPhotoMobile
JoomPhoto Mobile is a component for Joomla! that allows you to share the photos from your Android device to your site Joomla.

Learn more...  Demo

iFile Framework

IFile
IFile is an open source framework written entirely in PHP, allows the indexing of textual content of a document (DOC, PDF, EXCEL, etc.) and a quick search within them.

Learn more...  Demo

Easy Language

EasyLanguage
Easy Language is a plugin for easy and immediate management of multilingual texts in every possible area of joomla, articles, components, modules, metadata, template, other components(example K2) etc.

Learn more...

Article Book Effect

Article Book Effect
View Joomla articles with the effect turns the page of a book. This plugin will display the contents of an article in Joomla as a real book or magazine, using all the benefits of HTML5

Learn more...  Demo

 

Passport photo

Passport photo
The most popular Android app that allows you to print photos cards for your documents with your Android smartphone, in a simple and intuitive way.

Learn more...

 

Crazy Shadow

Crazy Shadow
Crazy Shadow is the 3D fast-paced and fun puzzle Android game! Try to rotate and drag shapes in the position of their shadows without fail! Solve in succession all combinations of levels of the game.

Learn more...

 

Admin Countdown

Admin Countdown
Module for Joomla! 2.5 and 3.x displays in the administration part of the site, a timer with countdown of the time remaining in your session.

Learn more...  Demo

 
Welcome, Guest
Username: Password: Remember me

TOPIC: Small problem class='active' for home page

Small problem class='active' for home page 13 Jan 2013 11:03 #878

Hello there,

Let me start of by saying what a great extension this is.
I ran into the following problem when using this plugin.

The joomla menu module assigns the class 'active' to a menu item when rendering the menu_items and $item->id == $active_id.
The problem that arises now is that $item_id for the home menu has a different id than $active_id when you are on the home page.
$item_id for the home menu is from the 'real menu' and $active_id is from the dummy menu.

I manually fixed this by adding the following to mod_menu.php:

if ($active_id == '117' || $active_id == '118' || $active_id == '119') {
$active_id = '101';
}

where: 117,118,119 are the dummy id's and 101 is the 'real' id.

I tried to think of an automatic workaround, but couldn't think of a quick way.
Perhaps you could integrate this in your future releases.

As someone else asked before, I would also like to see an option to make the language switcher not go to the translated homepage but translate the current page.

Kind regards,

Nick Burgmeijer
The administrator has disabled public write access.

Small problem class='active' for home page 13 Jan 2013 11:51 #880

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
Yes, we are already working and we are making good progress. Once we have some more time we should conclude.
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
The administrator has disabled public write access.

Small problem class='active' for home page 13 Jan 2013 11:58 #881

Nice nice,

Glad to see it adressed. This plugin is a nice 'lightweight' replacement for Joomfish.
I'll wait for the next release then :)

Nick
The administrator has disabled public write access.

Small problem class='active' for home page 13 Jan 2013 13:45 #885

Just made a quick and dirty change for the class='active' problem.
This fix is ID-independent.

Edit the following file: \modules\mod_menu\mod_menu.php

replace the following line:
$active_id = isset($active) ? $active->id : $menu->getDefault()->id;

with:

if (isset($active)) {
	if ($active->home != 0) {
			$active_id = $menu->getDefault()->id;
		}
		else {
			$active_id=$active->id;
		}
	}
	else {
		$active_id=$menu->getDefault()->id;
		}
Last Edit: 13 Jan 2013 13:55 by Nick Burgmeijer.
The administrator has disabled public write access.