Breadcrumb NavXT 3.3.0

Holy consolidated plugins Batman! With Breadcrumb NavXT 3.3.0, only one plugin is shipped, the old and separate “core” and “administrative interface” plugins have been superseded with just one Breadcrumb NavXT plugin. Direct access to the bcn_breadcrumb and bcn_breadcrumb_trail classes is still possible for those who need more flexibility than the administrative interface offers. Under the hood, the bcn_breadcrumb class has expanded to include some code that should have been in it rather than bcn_breadcrumb_trail. At the same time the code in the bcn_breadcrumb_trail class has been refactored to reduce duplicate code and reduce execution time.

Minor changes were made to the XML importer/exporter so that the XML output is well formed XML. With Breadcrumb NavXT 3.3.0, two new translation sets have been added, Swedish and Russian thanks to Patrik Spathon and Yuri Gribov. There are now five up to date translations distributed with Breadcrumb NavXT along with the default English strings. These are:

  • Spanish by Karin Sequen
  • German by Tom Klingenberg
  • Dutch by Stan Lenssen
  • Russian by Yuri Gribov
  • Swedish by Patrik Spathon

Again, the French translation has not been updated for this release since the former translator did not respond to the release notice a week ago. If you know French and can update the translation, please leave a comment to this post. Also, if you do not see your language in the list and wish to provide a translation, please leave a comment to this post stating so.

You can grab the latest version of Breadcrumb NavXT from the Breadcrumb NavXT page.

-John Havlik

[end of transmission, stay tuned]

10 thoughts on “Breadcrumb NavXT 3.3.0

  1. Great great stuff. It’s surprisingly dense code for what “seems” like a simple task, but being an amateur (at best) programmer, I eventually got lost in the code (nicely commented and formatted, mind you!) and just assumed “it works. It is very very good. I need know no more than that.”

    One thing that seemed a bit funny, though, and it could just be user error (with me it usually is):

    I have a style set for my anchor tags. Let’s say it’s “a {color:#abc;}”, to facilitate a “starting point” for my anchor colours… if all else fails, they’ll be #aabbcc in colour.

    If I add a class to my stylesheet matching the one the plug-in uses (so, for example, “.breadcrumb {color: #def;}”), it doesn’t catch. The “a” is inside the div “breadcrumb” and therefore higher up in inheritance “rank”. The colour is still #abc. Fair enough, I try this: “.breadcrumb a {color: #def;}” to specify anchors within any div having the class of breadcrumb, but still no dice.

    I’m not sure why regular anchor still has higher rank than “breadcrumb anchor”. I managed to get it to work, but I had to use the !important trick: “.breadcrumb a {color: #def !important;}”. This worked, but I had to tweak around a bit… if I’m not mistaken, your description says that just changing “.breadcrumb” should be enough.

    Am I missing something glaringly obvious to people with more experience?

    • Greg,

      To style the anchors, when contained within a <div> element belonging to the class “breadcrumb” you should be able to use:

      .breadcrumb a
      {
      color: #0099ff;
      }

      That code should change the anchor color to a light blue color, you shouldn’t need to use the !important qualifier. The fact that the !important quantifier results in the desired behavior for you means that some other CSS is styling the breadcrumb anchors, and is located below the CSS that you were working with. Double check all of the CSS that you are using, you probably have a rule for anchors that is broader in scope than the one you added and located below it in the code. Always place your broadest scoped CSS selectors at the top of your CSS file to reduce issues similar to those you are experiencing.

      -John Havlik

      • Hey John,

        Thanks for taking the time to reply. Indeed, I am using other CSS that styles the anchor. That CSS appears in the “style.css” file and is very global in scope. It’s “a {color: #abc;}”, which means that any anchor tag on my page should have abc as its colour by default.

        Looking at the styles in FireBug, it is clear that this style is indeed taking priority over .breadcrumb a. It’s the highest in the hierarchy of importance somehow.

        I’ll double-check (I have to admit, I didn’t do that as of writing this response!), but I’m pretty sure it’s set up so that style.css is inherited before the plug-in is instantiated. Do you think it might have to do with the plug-in function? Is the PHP in the back end such that the plug-in CSS is fired up before style.css is called?

        Greg

        • Actually, scratch that…

          they’re both inside style.css… not sure where my head was.

          a {} was at the top of style.css, while .breadcrumb a{} was much further down. I always thought that the lower-down ones would have LOWER priority, but I must have had it backwards…? When I moved .breadcrumb a{} to the top of style.css, I no longer needed !important.

          Am I just going crazy? I thought that was backwards?

          • Greg,

            Greg: When I moved .breadcrumb a{} to the top of style.css, I no longer needed !important.

            That doesn’t make sense. CSS is parsed by the browser in the same manner as HTML and JavaScript, from top to bottom. Anything located at the top can be overridden by code lower in the file. For example:
            .breadcrumb a
            {
            color: #0099ff;
            }
            div a
            {
            color: #ff9900;
            }
            will cause the link to be orange in color (the lower “div a” statement overrides the top statement since it is lower in the file, and, in this case, of wider scope). At least that’s how it should behave according to W3C specifications.

            Also, Breadcrumb NavXT does not include any CSS styling for the breadcrumb trail itself. So the problem should not be with its code.

            -John Havlik

          • That’s what I thought, too. I thought that reversing that order didn’t make any sense.

            I’m at a loss. I could make guesses but they’d probably be wrong. I think I’ll just accept it for what it is for now, and trouble-shoot my own site at some point in time before concluding that the plug-in is at fault. Frankly, I DON’T think it’s the plug-in, I just can’t explain why I needed !important or to reverse the order of inheritance…. so weird…!

            Thanks for your time,
            Greg

  2. Hey with this new version can we still include it with our themes as with version 1.8

    I naturally leave all comments credits and other things related to your plugin in tact but with 1.8 I could easily include the code in my functions.php and have the breadcrumbs work in the template without users need to activate.

    Is that still okay in this release?

    Great work BTW, I love the plugin.

    Jared Ritchey

    • Jared,

      Yes, you may distribute it with your theme. The only thing I would suggest it you do not actually place the code within the theme’s functions.php file. Instead, use an PHP include statement in the theme’s functions.php file, then do what you need to directly access the bcn_breadcrumb_trail object. The reason I suggest this is others have had issues when pasting the contents of the breadcrumb-navxt-core.php into a theme’s functions.php.

      -John Havlik

Comments are closed.