Breadcrumb Function integrated NavXT Breadcrumb!
Check it out, the code speaks for itself.
http://pods.pastebin.com/f30af9ff
But incase you don't speak developer, this code lets you display items from your Pods Menu like NavXT does. And when you're not on a Pod Page, it will revert to showing the NavXT Breadcrumb as normal. Saves you the trouble of messing with two functions at once!
21 Answers
I forgot to explain that these functions have Wildcard support built in, but Pods doesn't have that support yet.
Okay, I'll reply once more to explain better. Even though these functions have wildcard support, and Pods doesn't, everything will work regardless. This is because the wildcard support I've added didn't require a database structure modification.
Nicely done. I'm going to use this.
Really hate to be so uninformed, but where does this code go?
Ah, found it (I think) - lines 161-206 in functions.php?
I replaced lines 161-206 of the ../pods/core/functions.php, installed Breadcrumb NavXT (replacing previous breadcrumb plugin), and included the code in all my template files... But my breadcrumb trail shows 404 ==> http://familyholidayandleisure.com/fun-holiday-activities/ ?
For this to work correctly, you must have your Menu structure built with the Pods Menu section of WP-Admin. Are you using that?
Ok, no I am not at that point yet - just a note: when I went into the pods menu editor right now, the "home" menu item disappeared (with the modified functions.php) - I put the original functions.php, and the "home" menu item showed again (after refreshing)...
Does this mean that when I come to that point, I should create the menu first, and only then upload the modified functions.php?
This code isn't meant to replace the current code in functions.php of the Pods plugin. It's meant to go in your theme's functions.php, or to append the functions.php file in your Pods plugin.
Thanks Scott - I have added the code to my theme's functions.php now. I have created a menu item with "pods menu creator": http://familyholidayandleisure.com/fun-holiday-activities/ , and added the "block widget" (from the "Widget Block" plugin) to the left sidebar, with the following code:
<pre> <div class="flyout"> <?php echo pods_navigation('/fun-holiday-activities/', 1); ?> </div> </pre>
On my menu (left sidebar) it shows only the label for the menu (just below the existing sidebar menu), which is "Test Menu". It does not display the menu item which I intend it to display.
When I add the following code to a second block widget, it does display the menu (Test Menu 2): <pre> <div class="flyout"> <?php echo pods_navigation('/', 1); ?> </pre>
You can see both menus displayed on top of each other in the left sidebar at http://familyholidayandleisure.com/fun-holiday-activities/
In case 2 it is obviously not very practical for me, as you can see all child items will now fly out from the home item, as I cannot add items on the same level as the "Home" item with "pods menu creator"...
Also, in case 2 I don't have any control over what will be displayed.
Main problem then is why is the Menu 1 not displaying? And also, breadcrumbs are still not displaying either (still 404)...
I can plead for your patience, or I can quit (which is not an option).
So, I plead for your patience :)
There are still some quirks with the menu system. I'd recommend holding off with the Menu Editor until we have some time to address the issue.
@logikal - Thank you, I thought so... Does that mean I have to wait until then, before I can integrate breadcrumbs on my pod pages, or is there perhaps some other code that I can use in my WordPress template?
@flightoftheowl - if you don't have too many Pod Pages, I'd recommend hard-coding breadcrumbs into your pages for now.
I haven't worked on the Menu Editor for quite some time, and it may involve some significant changes under-the-hood to make it as flexible as possible.
I've updated the Breadcrumb code, it can be seen here: http://pods.pastebin.com/f54585110
Changes are:
- You can override Titles in the breadcrumb by $pods->bread[$level] = $newtitle
- Bug fixes with the way it handles multiple wildcards (/friends///)
- Other assorted bug fixes
@flightoftheowl - How urgent is it for you to get the Menu / Breadcrumb working? I may be able to help you get everything working.
Hey Scott, thank you very much... It is quite urgent, thing is I have a gazzilion things to fix and get the site up and running, pod page breadcrumbs is just one of them...
Ultimately I would like to use the menu system that I am currently using, which is WP Menu Manager (http://www.ultimateidx.com/menu-manager/) - this takes care of all my menus... If I really have to incorporate a menu created with pods in order to get the breadcrumbs functioning, I would rather then use it at the bottom of the page (in footer.php), where I currently have the placeholder "Footerlinks Here..." (http://familyholidayandleisure.com/)
It would be awesome if you could help me Scott, if it wouldn't take too much of your time... It would certainly be one thing off my back... I would like to know how to do it myself though, the learning curve is just a bit steep at the moment :)
flightoftheowl[at]gmail[dot]com
I made a small change to your code (highlighted on the following link) because the output had double slashes (//) before and after each segment. -
changed: $menu_uri = '/'.$val['uri'].'/';
to: $menu_uri = $val['uri'];
http://pods.pastebin.com/f6866cc8a
Is there a simple way given the latest updates to have the pods pages and detail pages show up in the breadcrumb navxt trail? Any help would be appreciated.
Is this still the only valid way to integrate NavXT Breadcrumbs and Pods?
thanks, Scott


