Page 1 of 1

Hierarchy problems with modules

Posted: Sat Jun 04, 2005 8:58 am
by nils73
wishy,

I have figured out a problem with $gCms->variables['position'] within module.functions.php because I got 00003.00007 instead of 3.7 when being on a module-generated page. Again this is just a dirty hack but you might know where to solve it. On line 144 - 145 I have inserted:

$gCms->variables['position'] = $line['hierarchy'];
$gCms->variables['position'] = str_replace("0000", "", $gCms->variables['position']);


I should finally sign-up for the bug-tracking module ... but (as always) I am either too busy or too lazy. ;)

Regards
Nils

Re: Hierarchy problems with modules

Posted: Sat Jun 04, 2005 12:10 pm
by Ted
You can also do:

Code: Select all

ContentManager::CreateFriendlyHierarchyPosition($line['hierarchy']);

Re: Hierarchy problems with modules

Posted: Sat Jun 04, 2005 3:07 pm
by nils73
Thank you, wishy --- the new lines look like this:

$gCms->variables['position'] = $line['hierarchy'];
$gCms->variables['position'] = ContentManager::CreateFriendlyHierarchyPosition($line['hierarchy']);


Is there anything like this CreateFriendlyHierarchyPosition for $title? Looks like it does not use any title at all, so I use a hack there as well.

Regards,
Nils

Re: Hierarchy problems with modules

Posted: Sat Jun 04, 2005 3:14 pm
by Ted
No, there isn't.  But it would probably be a good idea.  Lemme see if I can come up with a good way of doing it...

Re: Hierarchy problems with modules

Posted: Sat Jun 04, 2005 3:32 pm
by nils73
Probably grabbing the title for return_id (the respective page) would be a good idea ...

Just my 0.02 EUR

Re: Hierarchy problems with modules

Posted: Sat Jun 04, 2005 7:55 pm
by Ted
Oh, yeah, that's an idea.

I was thinking more along the lines of the module being able to set it's own title if it had control of the page...  like News detail

Re: Hierarchy problems with modules

Posted: Sun Jun 05, 2005 10:51 am
by nils73
Actually with return_id you could have both (isset) ... but this idea is only worth my 0.01 EUR .. ;)