Posted by wapnik on May 27, 2010 at 11:56pm
| Project: | Token |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
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
#1
Patch here (for 6.2-dev). Provides path and title tokens for displays of enabled views, where these paths and titles are set.
#2
Currently 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
#3
As 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.
#4
See rules as example.
#5
Ok i moved and reimplemented this to the token module. Patch for token 6.x-1.x-dev included.
#6
now included
#7
The last submitted patch, token.patch, failed testing.
#8
#6: token.patch queued for re-testing.
#9
The last submitted patch, token.patch, failed testing.
#10
Since *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.
#11
Ok so i created the token_contrib.module starting with this views support.
#12
The last submitted patch, token_contrib.patch, failed testing.
#13
So is this the right way to go?
#14
Would this code be better integrated with the tokenSTARTER module? It seems consistent with the purpose of that module.
#15
I thought that's only an example module serving as a template for new modules implementing tokens.
#16
+1
#17
+1
#18
You should put this code in a sandbox project to share. This will not be appropriate to put in token.module.