I have 3 different views where the user will navigate from one view to another in a sequence way. Assume the v1 list all student classes and v2 list the details of a single class and v3 list the details of a single subject.

enter image description here

V1 is the only view linked to the menu item 'Classes' and the item id is 107. I am trying to manually add the breadcrumbs when the user navigate to other views with the same item id.

v2 -> view.html.php

$pathway = $this->_app->getPathway();
$pathway->addItem("Single Class", "index.php?option=com_example&view=v2&classid=1&Itemid=107");

v3 -> view.html.php

$pathway = $this->_app->getPathway();
$pathway->addItem("Single Subject", "index.php?option=com_example&view=v3&subid=1&Itemid=107");

When the user is in v2 the breadcrumbs is as 'Home->Classes->Single Class' which is correct. When the user naviage to v3 then the breadcrumbs becomes as 'Home->Classes->Single Subject' which is wrong. What I need as 'Home->classes->Single Class->Single Subject'.

Can someone advice on this?


The Basic-Question is: How did you construct your component?

While displaying the v3, joomla/pathway must know the chain from v1 to v2 to v3

The v3 example does not populate the v2 item.

So you have extract from v3-Item the parent such as


$pathway = $this->_app->getPathway();

$pathway->addItem("Classes", "index.php?option=com_example&view=v2&classid={$v3Item->classid}&Itemid=107")

$pathway->addItem("Single Subject", "index.php?option=com_example&view=v3&subid=1&Itemid=107")

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.