Joomla – Modify the name or link value in the pathway ( jPathway ) object

This is normally impossible to do because $jApp->getPathWay returns an object with the pathway items as protected properties.. you can’t modify them or even loop through them to build a new pathway array.

My dilemma is that I wanted to alter the link for one of the breadcrumbs to point to a different URL, I have my reasons so don’t ask =)

I solved it by casting the returned items object as an array, then reset the array to get rid of the funky named keys.. This left me with a very simple object to work with.. I was able to read out the existing values, search for what I wanted to replace and then rebuild the breadcrumbs with the altered data.

1 Responses to Joomla – Modify the name or link value in the pathway ( jPathway ) object

  1. lonnie says:

    I could – forgive me, this reply is SO very late… but Joomla has changed the way things work so this isn’t really applicable ( I suspect ) … and I think by now you’ve probably solved your issue.. if not you can let me know and I can help you come up with something

Leave a Reply to lonnie Cancel reply

Your email address will not be published. Required fields are marked *