It seems like this module combined with the PURL and SPACES Module doesn't work. These modules are used by Open Atrium, ELMS and Open Scholar.

Is there anyway you can add in PURL support for this? I believe it is PURL that is causing it not to work.

Thanks for the great module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gmclelland’s picture

From further testing it looks like the spaces_og.module included with the spaces module causes CB not to work. I'm still trying to find a fix.

gmclelland’s picture

After more investigation, it looks like it was caused by the spaces_og.module 6.x-3.2

/**
 * Implementation of hook_context_page_reaction().
 * Allows Spaces OG to set the breadcrumb just prior to theme('page')
 * taking over.
 */
function spaces_og_context_page_reaction() {
  $space = spaces_get_space();
  if ($space && $space->type === 'og') {
    $item = menu_get_item();
    // Only set the breadcrumb if user has access to this page.
    if ($item['access']) {
      $bc = og_get_breadcrumb($space->group);
      $bc[0] = l(t('Home'), "", array('purl' => array('disabled' => TRUE)));
      drupal_alter('spaces_og_breadcrumb', $bc);
      drupal_set_breadcrumb($bc);
    }
  }
}

When I comment out this function everything seems to work. Now I just need to figure how to get the "Home" breadcrumb using Custom Breadcrumbs module to be PURL disabled so that it goes to the site homepage instead of the group homepage.

Anybody have any thoughts?

Hope that helps someone.

gmclelland’s picture

I guess I should create a token or Custom Identifier for the "site frontpage" that sets purl to disabled for that link?

gmclelland’s picture

I created a PurlDisabledSiteUrl Token (see attached), but for some reason if it is used in the "path" field it gets wrongly encoded and it STILL gets prefixed with the purl modifier, yet it looks correct if used in a "title" field. If you look at the token you will notice when I build the link I set the l() function to disable purl. Does Custom Breadcrumbs run all breadcrumbs through an additional l() or url() that could be causing this?

Can you please tell me if the better approach would be to create an additional Custom Breadcrumbs Identifier, something like <purl-disabled> so that any breadcrumb link could be disabled by purl?

Would love to hear some feedback.

gmclelland’s picture

FileSize
1.41 KB

Here is a start to building the Purl Disabled Identifier. (see attached) It doesn't work yet. I was hoping someone could give me a few pointers of what I'm doing wrong.

gmclelland’s picture

FileSize
1.41 KB

Ok, I believe this is working now. Hope it helps someone.

gmclelland’s picture

Here is the PurlDisabledSiteURL Token.

You have to use it together with the Purl-Disabled identifier like this:

Titles:
Home

Paths:
<purl-disabled>|[purl-disabled-site-url]

Note: The Purl-Disabled Identifer doesn't work for tokens that have a pregenerated url like [site-url] or [node-url], because PURL adds the modifer to the token.

It does seem to work with something like this:
Titles:
This node id is [nid]

Paths:
<purl-disabled>|node/[nid]

Hopefully someone else more knowledgeable than me will come along and improve this.

-Glenn

lamp5’s picture

Issue summary: View changes
Status: Active » Closed (outdated)