问题描述:

I've already gone thru: http://docs.joomla.org/How_to_add_breadcrumbs

and http://api.joomla.org/Joomla-Framework/Application/JPathway.html

but they don't help.

I have not found any more info in any books or internet.

My website has 1000's of pages generated thru script.

I want to generate breadcrumb navigation for the pages.

Google has refused me Adsense account due to this lack of navigation.

网友答案:

I'm not sure what else there is to explain. Joomla stores breadcrumbs in the $pathway object. A components adds items to that object using 2 parameters, name and link.

You call the object with:

$pathway   =& $mainframe->getPathway();

Then you add to it with:

$pathway->addItem('name of item', 'link to item');

Then you add the breadcrumb module in the module manager. There is no more too it, what else would you need?

网友答案:

The breadcrumb is generally updated by the component that is being called.

$pathway =& $mainframe->getPathway();

And then

$pathway->addItem($membership->name, JRoute::_('index.php?option=com_rsmembership&view=membership&cid='.$membership->id.':'.JFilterOutput::stringURLSafe($membership->name) . "&Itemid=" . $itemid));

The above is an example from rsmembership

Essentially the breadcrumb is maintained (or stored) by Joomla, and added to by the components.

相关阅读:
Top