I'm using several views with page displays having menu items, titles and paths. I'm also using custom breadcrumbs, which are utilizing tokens for building the breadcrumb.
So right now if i want to mention the view in the breadcrumb trail, i have to copy the view title and path from the view to the breadcrumb setting. I think it makes sense to have tokens carrying these data.
I haven't tested views 3 for this feature (neither dev versions), and did only a sporadic search in the issues. If this is implemented already or discussed somewhere else i apologize for spam.
Comments
Comment #1
wapnik commentedPatch here (for 6.2-dev). Provides path and title tokens for displays of enabled views, where these paths and titles are set.
Comment #2
dawehnerCurrently the behavior to integrate other contrib modules is that they implement this for views. See rules as an example.
Here this might be different, because token is part of core for 3.x
Comment #3
wapnik commentedAs far as i know token module (for drupal 6) implements tokens for core parts. Views is not a part of the core. For example cck (for drupal 6) implements its own tokens for its content fields by itself. I assumed this should be the way with views too.
For 3.x implementation i think in this case it would be not much different from this 2.x.
Comment #4
dawehnerSee rules as example.
Comment #5
wapnik commentedOk i moved and reimplemented this to the token module. Patch for token 6.x-1.x-dev included.
Comment #6
wapnik commentednow included
Comment #8
wapnik commented#6: token.patch queued for re-testing.
Comment #10
dave reidSince *Views* is not in core, we should and cannot add these tokens in token.module.
Although I'm not exactly unopposed to having some kind of token_contrib.module included in token.module that would provide fun tokens like block output, views output, etc.
Comment #11
wapnik commentedOk so i created the token_contrib.module starting with this views support.
Comment #13
wapnik commentedSo is this the right way to go?
Comment #14
MGN commentedWould this code be better integrated with the tokenSTARTER module? It seems consistent with the purpose of that module.
Comment #15
wapnik commentedI thought that's only an example module serving as a template for new modules implementing tokens.
Comment #16
kenorb commented+1
Comment #17
ñull commented+1
Comment #18
dave reidYou should put this code in a sandbox project to share. This will not be appropriate to put in token.module.