Breadcrumb Function integrated NavXT Breadcrumb!

0

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!

asked Feb 5 '10 at 8:49

sc0ttkclark

2936

add comment
enter at least 15 characters

21 Answers

0

I forgot to explain that these functions have Wildcard support built in, but Pods doesn't have that support yet.

answered Aug 20 '09 at 2:36

sc0ttkclark

2936

add comment
enter at least 15 characters
0

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.

answered Aug 20 '09 at 2:41

sc0ttkclark

2936

add comment
enter at least 15 characters
0

Nicely done. I'm going to use this.

answered Aug 23 '09 at 4:05

nikos

25

add comment
enter at least 15 characters
0

Really hate to be so uninformed, but where does this code go?

answered Aug 23 '09 at 4:47

flightoftheowl

1

add comment
enter at least 15 characters
0

Ah, found it (I think) - lines 161-206 in functions.php?

answered Aug 23 '09 at 4:55

flightoftheowl

1

add comment
enter at least 15 characters
0

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/ ?

answered Aug 23 '09 at 6:44

flightoftheowl

1

add comment
enter at least 15 characters
0

For this to work correctly, you must have your Menu structure built with the Pods Menu section of WP-Admin. Are you using that?

answered Aug 23 '09 at 6:49

sc0ttkclark

2936

add comment
enter at least 15 characters
0

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?

answered Aug 23 '09 at 6:57

flightoftheowl

1

add comment
enter at least 15 characters
0

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.

answered Aug 23 '09 at 10:19

sc0ttkclark

2936

add comment
enter at least 15 characters
0

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 :)

answered Aug 24 '09 at 7:31

flightoftheowl

1

add comment
enter at least 15 characters
0

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.

answered Aug 26 '09 at 9:06

logikal16

249

add comment
enter at least 15 characters
0

@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?

answered Aug 26 '09 at 9:24

flightoftheowl

1

add comment
enter at least 15 characters
0

@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.

answered Aug 26 '09 at 10:05

logikal16

249

add comment
enter at least 15 characters
0

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

answered Aug 26 '09 at 12:36

sc0ttkclark

2936

add comment
enter at least 15 characters
0

@flightoftheowl - How urgent is it for you to get the Menu / Breadcrumb working? I may be able to help you get everything working.

answered Aug 26 '09 at 12:38

sc0ttkclark

2936

add comment
enter at least 15 characters
0

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 :)

answered Aug 26 '09 at 1:02

flightoftheowl

1

add comment
enter at least 15 characters
0

flightoftheowl[at]gmail[dot]com

answered Aug 26 '09 at 8:29

flightoftheowl

1

add comment
enter at least 15 characters
0

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

answered Jan 5 '10 at 4:26

elihorne

1

add comment
enter at least 15 characters
0

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.

answered Feb 5 '10 at 8:49

IFCHoldings

21

add comment
enter at least 15 characters
0

Is this still the only valid way to integrate NavXT Breadcrumbs and Pods?

thanks, Scott

answered Sep 15 '10 at 4:05

scottnath

1

add comment
enter at least 15 characters
0

bump

answered Sep 21 '10 at 8:44

scottnath

1

add comment
enter at least 15 characters