Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be nice if one could write ctool plugins to add variables (much like one does with the hook_omniture_variables.
This can be helpful if one module wants to implement several hooks.
Comment | File | Size | Author |
---|---|---|---|
#7 | omniture-952408.patch | 2.16 KB | e2thex |
#6 | omniture-952408.patch | 6.11 KB | e2thex |
#1 | omniture_952408.patch | 1.67 KB | e2thex |
Comments
Comment #1
e2thex CreditAttribution: e2thex commentedI have attached a patch that use the hook_omniture_variables to pull in ctool plugin data.
This could also be done as a separate module, but I do not think it is very expensive and is a small addition. So it would be nice if it could get in to the omniture module
Comment #2
e2thex CreditAttribution: e2thex commentedIf someone has a change it would be nice to know if you all are interesting in this being part of the omniture module. If not I could easily put this in is own module.
Comment #3
gregglesI don't see how this is really very useful, can you explain why this is more useful than the current hook_omniture_variables?
Comment #4
gregglesAlso, I don't think a separate module/project on drupal.org is a great idea.
If there are more ideas like this which make sense to go in a submodule then we can make you a maintainer on this module as well and have you maintain the submodule inside of this drupal.org project.
Comment #5
e2thex CreditAttribution: e2thex commentedHere is the path we went down and end up want to use ctools.
First we have a custom module to set our omniture variables. We have 8 or so different actions for setting variables (eg, one for title and section, for for extra fields on blog posts, one for user data, etc) and we want to have a inc file for each of this, so then our hook would look like this:
I would also then have to include each of those files.
I was about this time that I realized I was recreating ctools plugins (poorly).
In general I find that ctools plugins allow a more flexibility in organizing a large module. It let me implement the hook more then one time in a module, this way I can group code on activity not on what hook is getting used.
I would be happy to maintain it as a submodule if that is the way you want to go.
Comment #6
e2thex CreditAttribution: e2thex commentedI have attached a patch that does it as a sub module
Comment #7
e2thex CreditAttribution: e2thex commentedSorry last patch had .svn junk