Closed vanderzielj closed 8 months ago
Hi,
My guess is that you have no organization
variable passed into your template context for asset_detail
.
Thus neither asset_list
nor organization_detail
chunks of your breadcrumbs could be resolved.
That makes sense. However, I decided against this package due to it's complexity. Though it seems like the right approach - taking advantage of Django infrastructure - it seems to require too much assumed knowledge for a new Django developer like myself. At least based on the ratings and questions other developers seem to have surmounted their difficulties. A day or so I decided to roll my own based on the context processor of Marcelo's django-dynamic-breadcrumbs package. I already have a working implementation after a day of work.
In any case, thanks for providing this package to the community.
Hi folks,
I am hoping someone can help me with this issue. I would like to know how to represent nested regular expression paths with django-sitetree Breadcrumbs. I have been unable to configure a Tree item that will result in the display of breadcrumbs for the Asset Detail View shown last in the (re_path) URLS below. I've attached a dump of my tree-site JSON to this message.
The following breadcrumbs work:
http://localhost:8000/orgs/
,http://localhost:8000/orgs/3
andhttp://localhost:8000/orgs/3/assets/
. The breadcrumb for the last url show is displayed as "MyApp > Organizations > Famous Org > Assets"However, when the get_tree_current_item tries to match against the URL for asset detail - e.g.
http://localhost:8000/orgs/4/assets/4
- it finds no match. I would like the breadcrumb to be, for example, "MyApp > Organizations > Onward Trucking > Assets > Peterbilt #4" where the organization with id #4 is "Onward Trucking" and the asset of that organization with the id 4 is "Peterbilt #4"The URLs for the top three items of my tree (the nesting goes down another couple of levels):
As you may observe, the url structure follows something like 'orgs/{org_id}/assets/{asset_id}/systems/{system_id}` where each step further along the URL path represents a child item of the preceding one.
assetstree.json