Page 1 of 1

Modules and bulletmenu (ImageGallery)

Posted: Sun Oct 02, 2005 2:37 pm
by zieren
Hi all,

I'm using ImageGallery (great module!) and what it to integrate seamlessly with the rest of the site. By default, when linking to an album from a non-toplevel content item the bulletmenu collapses when browsing the album. This seems to be due to $curpos in the bulletmenu changing from, say, "5.1" to something like "000005.000001". The bulletmenu looks for $curpos in the content elements' hierarchy, and of course finds no match.

Now I'm wondering if this is intentional? I would like the last viewed content element to still show as the active page in the menu when I navigate from there to the album. And since CMSMS does remember where I am, I just stripped the zeros from $curpos in bulletmenu:

Code: Select all

$curpos = $gCms->variables['position']; # original code
$curpos = preg_replace("/^0+/","",$curpos); # added
$curpos = preg_replace("/\.0+/",".",$curpos); # added
This seems to work fine, but since I'm not exactly a CMSMS expert I'm not sure if it breaks something else?