1

There may be a couple of ways to solve this, but it seems the JPathway/JMenu route is the most feasible.

I have legacy php code that is pulling design information from a database. The custom code is getting called through the Jumi plugin.

My problem is that the breadcrumbs disappear from the site when any of the Jumi pages are displayed. Each page is accessed via jumi-alias?catID=x and the corresponding Menu Items are configured as external URLs (It was the only way I could come up with to pass the parameter from the Menu Item).

If I have a menu structure like:

Designs

1.1DesignCat1(menu_id=529)

1.1.1DesignSubCat1(menu_id=569)

1.2DesignCat2(menu_id=530)

My primary and secondary menu items are static articles and they show the appropriate breadcrumbs, but as soon as I click on that sub-category menu item, I get nothing. I'm assuming I lose the Pathway information because of it being an external URL menu item or something in Jumi.

Within my DB/Jumi php code, I can access:

$app = JFactory::getApplication();
$parentMenuItem = $app->getMenu->getItem($id);
$pathway = $app->getPathway();

Initially, $pathway is empty and !NULL.

Is there a way for me to get the Pathway object of the parent menu item and then I can append it?

$parentMenuPathway->addItem('DesignSubCat1', 'jumi-alias?catID=x');
$app->getPathway()->setPathway($parentMenuPathway);

Or is there a Joomla API function to convert a JMenu object into a JPathway?

I could possibly iterate over the JMenu object and programmatically recreate a JPathway object, but I want to refactor this code into a component and I'm leery of digging into the JMenu Object.

I'm hoping there's something I've missed in the documentation.

I'm using Version 3.4.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.