I use D7.23, Forum, Advanced Forum latest dev, PB latest dev. In Advanced Forum I turned off breadcrumb generation. Next I've created new breadcrumb in PB, but I can't inject parent taxonomy term to it. I tried a lot of combinations like: %forum:parent:name, %forum:pb-join:name, %forum:parent:pb-join:name, %forum:term:pb-join:name an so on, but it not helped me. As I can see in path auto module, it has tokens for forum terms (Pattern for forums and forum containers): [term:parent:pb-join:?], [term:parent:name]. How can I inject parent taxonomy term name & url in PB for forum?

Here is PB what I'm using now:

$path_breadcrumb = new stdClass();
$path_breadcrumb->api_version = 1;
$path_breadcrumb->machine_name = 'forum';
$path_breadcrumb->name = 'Forum';
$path_breadcrumb->path = 'forum/%forum';
$path_breadcrumb->data = array(
  'titles' => array(
    0 => '%forum:name',
  ),
  'paths' => array(
    0 => 'forum/%forum:tid',
  ),
  'home' => 1,
  'translatable' => 0,
  'arguments' => array(
    'forum' => array(
      'position' => 1,
      'argument' => 'forum_id',
      'settings' => array(
        'identifier' => 'Forum: ID',
        'breadcrumb' => 1,
      ),
    ),
  ),
  'access' => array(
    'plugins' => array(),
    'logic' => 'and',
  ),
);
$path_breadcrumb->weight = 0;

Comments

kalabro’s picture

Category: bug » feature

Hello, dillix!
Unfortunately contexts from advanced_forum module are not supported by Path Breadcrumbs.
If you can help with advanced_forum integration, you are really welcome! :)

Spleshka’s picture

Agree with @kalabro, I would love to see advanced_forum implementation here!

dillix’s picture

I've already made much customization for AF, which you can see here. So if you give me start point, I can try to implement this in AF for PB;)

kalabro’s picture

Title: How to use parent in forum breadcrums » Integrate with Advanced Forum
kalabro’s picture

Issue summary: View changes

updated code

ChrisZZ’s picture

Issue summary: View changes

The forum solution did not work for me for the moment. First of all, I needed to access the group audience of the forum term, which seemed to be unavailable when interpreting the term as a forum id. Secondly, I could not get the forum breadcrumb to work. But due to the first short coming I did not try to hard - but implemented a different solution. I thought I just document it here, in case if somebody is interested, or somebody has a better idea.

First Level (Group)
Link Title: %term:og-group-ref:0:title
Link Path: %term:og-group-ref:0:url

Second Level (First Level Forum)
Link Title: %term:parent:parent:parent:name
Link Path: forum/%term:parent:parent:parent:tid

Third Level (Second Level Forum)
Link Title: %term:parent:parent:name
Link Path: forum/%term:parent:parent:tid

Third Level (Third Level Forum)
Link Title: %term:parent:name
Link Path: forum/%term:parent:tid

Final Level
Link Title: !page_title
Link Path: none

%term:pb-join: was not usable for me, as there was no tid available and therefore I could only link to the term page. Of course I could have than redirected the term page to the forum through some redirect module - but I think, this way I have a cleaner solution.

I do not expect to go any deeper than four layers for forums - actually until now, I only use three layers - so I did not test whether the three-fold parent would actually work.

I am using advanced forum in a e-learning site with organic groups and course module.

If anybody has a better solution for the forum breadcrumb combination with go breadcrumb, I am happy to hear about it. Otherwise my solution works well for me.