Breadcrumb NavXT
Breadcrumbs in the search loop (2 posts)

  1. hypeon
    Posted 2 years ago #


    I wish to place the breadcrumbs in the search results, however whenever I do this (through the search template) it outputs the same breadcrumbs as the page.

    Example: here

    I want to recreate something similar to this:

    Any help appreciated.


  2. John Havlik
    Plugin Author

    Posted 2 years ago #

    Internally, Breadcrumb NavXT caches the breadcrumb trail so that it doesn't regenerate it several times on multiple calls. This causes issues if you are expecting it to change per an item in an archive page. There isn't any really good ways to get around this behavior at the moment. There are two ways, but they will not work in Breadcrumb NavXT 5.0. They are:

    1) Before each call to bcn_display() place the following:

    global $bcn_admin;
    $bcn_admin->breadcrumb_trail->trail = array();

    2) Manually create a new instance of a bcn_breadcrumb_trail object and call the requisite member functions rather than using the bcn_display() wrapper.

    The internal structure of the plugin is changing in version 5.0 (git branch "Dancer"), and the above two methods will have to be adjusted to match the new structure. Though, I could probably add in something to bypass the caching.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Breadcrumb NavXT
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic