Closed (fixed)
Project:
Crumbs, the Breadcrumbs suite
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2010 at 12:39 UTC
Updated:
15 Oct 2012 at 20:31 UTC
I've two classes with two methods (priority as listed):
1. content_search->decorate__doc_search_content()
2. breadcrumb_doc->decorate()
I want to skip the second one, if the first method was able to create the crumb on specified condition.
Tried: skipInBreadcrumb(), but it removes the whole item.
Is there anything like: skipTheRest ?
Comments
Comment #1
kenorb commentedWorkaround is to write condition:
But there should be some method as well, to improve the performance, instead of scanning all the rest crumbs. Then the module with low priority has the highest priority, because it overrides the crumb as the last.
Comment #2
donquixote commentedIn the 2.x branch there is now a method findTitle() that is used instead of the old decorate() method.
The mechanic is more like findParent(), though.
The code for priorities logic has been changed a lot in 2.x, so now the configured order of plugin rules determines which title will be used.
And for performance, the process will stop when all further rules would have a lower priority than the one found.
(Internally, it is top of the list = low weight = high priority, but you don't need to think about that)
Comment #3
donquixote commented"needs review" = "probably fixed in 2.x"
In general, after finding a title, crumbs will not continue to look further.
Just make sure to put the rule at the top that has the higher priority.
Comment #4
bojanz commented