Can we edit the breadcrumbs in Smartdocs model?

Not applicable

Hi,

A default breadcrumb "Home>><API name> documentation" is being displayed on every smartdoc model page.

I need to edit the breadcrumb. I created path breadcrumbs but the changes were not reflected.

Please help me edit the breadcrumb for the smartdoc model.

Thank you!

0 6 489
6 REPLIES 6

jaywanttopno
Participant III

@Rashmi Rajkumar This is the default breadcrumb pattern set by APIGEE. written in profiles\apigee\themes\apigee_responsive\templates\pages\page.tpl.php

As per your requirement you can use https://www.drupal.org/project/path_breadcrumbs to generate breadcrumbs through out the site.

Hi Jaywant,

We tried creating breadcrumb through path breadcrumbs module but there was no change in the breadcrumbs. It was still the same.

Please let us know if there is any alternative method to do the same.

Thank you!

1.unset existing breadcrumb in page.tpl.php
2. create breadcrumb using custom module.

try to debug smartdocs detail page. try printing available variable on the page.

I'm having the same issue. The breadcrumbs I set in path_breadcrumbs don't seem to want to come up on the SmartDocs method details pages. I think something is happening on these pages that overrides my breadcrumbs with some sort of default.

This same issue is happening for me. I have the Path Breadcrumbs module installed, and I have configured breadcrumbs successfully for my pages EXCEPT for my SmartDocs model's method details pages. These pages still show the default "Home / {API Name} Documentation".

So far I have tried:

  • configuring Path Breadcrumbs for these pages
  • deleting breadcrumbs from page.tpl.php like Jaywant suggested, but that removes them all
  • Turning off Path Breadcrumbs renderer option
  • Turning on Path Breadcrumbs renderer option

No dice. I still see the incorrect breadcrumbs on those pages. Does anybody have another idea to help debug where these incorrect breadcrumbs are coming from?

I found out the answer to this issue. What's happening is there is a breadcrumb hook in one of the Apigee parent themes that is overriding any breadcrumbs you set in a module such as Path Breadcrumbs. Basically, these theme hooks always run last, and any module code is run before that.

So the way I fixed it temporarily was to find the breadcrumb hooks in the parent themes, and edit them until I found the culprit. For me it turned out to be "apigee_testing", which I thought was kind of unusual, considering that I thought the "_testing" theme wasn't even used. Either way, I edited the "smartdocs.theme.inc" file. There was a hook called "_smartdocs_preprocess_node_page" that set the breadcrumbs at the end of it. I configured the breadcrumbs properly from there, and that's how I figured out this parent theme file was overriding my special Path Breadcrumbs I made for the SmartDocs method pages.