Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2010 at 05:09 UTC
Updated:
9 Apr 2012 at 19:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joshuajabbour commentedThe attached patch fixes this issue for node, user, and token (global) converters.
Comment #2
deleuje commentedI was just about to abandon Panels once again for template files.
This patch saved me.
Thanks!
Comment #3
james.williams+1
Comment #4
spuky commentedThis Patch helpt to get CCK fields in Panels context...
Comment #5
joshuajabbour commentedif you've reviewed and applied this patch and not found any bugs, please mark RTBC
Comment #6
bludrop commentedI applied the patch, however I can't figure out how to include CCK fields in my panels content. The "substitutions" list doesn't include any of the CCK field tokens, it just has the few %node keywords.
How can I use a keyword to display content from CCK fields?
Comment #7
jim kirkpatrick commented+1
Comment #8
joshuajabbour commentedrerolled patch
Comment #9
jim kirkpatrick commented#8 Works well for me, thanks Joshua.
Comment #10
Letharion commentedDoesn't the output get rather messy though?
For example when I have three different vocabularies that I can tag a node with, I get:
Name of terms vocabulary
Name of terms vocabulary
Name of terms vocabulary
Kinda hard to tell which selection comes from which vocabulary. And I get a lot of those identical triplets.
I'll see if I can work it out.
Comment #11
merlinofchaos commentedWe might need to do this in 2 phases. Go ahead and properly open it up so that all tokens are available, and then allow token categorization. Though I dunno if the necessary text will be available.
Comment #12
Letharion commentedtoken_get_list() does not provide enough information by itself to properly identify the options.
However, just removing reset() will provide something looking like the attached screenshot.
Comment #13
Letharion commentedI just realized that my approach does not play well with the panels ui.
Comment #14
itangalo commentedsubscribing
Comment #15
joshuajabbour commentedYes, as per #12, token.module itself doesn't provide enough metadata to make useful labels. It def makes the UI confusing, but it is better to have a confusing UI, or a bunch of unavailable data? I don't know...
Comment #16
itangalo commented@joshuajabbour: A confusing UI has always been preferred over unavailable data in the Drupal world, as far as I know. And I'm all in favour. :-)
Comment #17
ayalon commentedAt the moment, it is not possible to pass a CCK Value (for example the year of a date field) to a view.
The proposed patch has some problems if you have multiple cck fields with the same field type. You will have duplicate entries and cannot determine the according field.
My patch adds the field name. Now you can easily determine the correct token.
Comment #18
Anonymous (not verified) commented+1
Comment #19
james.williamsAnyone interested in getting this functionality for D7 should take a look at #691078: Field tokens. It's currently at nearly 300 comments though! The patch for Token module in http://drupal.org/node/691078#comment-4139738 looks to be the best progress so far. Note that CTools uses the core token system in D7.
Comment #20
jim kirkpatrick commentedPatch in #17 works like a dream on toast. Please commit!
Comment #21
pierremarcel commentedI second the patch on #17 it works great so far, but still on a staging site... after applied it list all the cck fields available in panels, great job Ayalon thanks for the patch!
Comment #22
dave reidRe #19: That shouldn't be necessary for CTools in D7 now that we have properly nestable tokens. People cannot and should not just create arbitrary token categories that still mean 'node' in D7.
Comment #23
sketman commentedI applied patch in post #17 but it did not work for me. No new tokens are available in Panels as contexts. It was my first patching experience, however. Even I did not get any error message during, I could do something wrong.
Guys, dont wanna bothering, but could you somebody attach here patched node.inc file please?
Thanks in advance...
Comment #24
rootworkPatch worked for me as well. Would love to see this get applied.
@sketman: The patch actually modifies three files: node.inc, user.inc and token.inc. Maybe that's the trouble you're running into?
Comment #25
summit commentedHi, Is this patch also committed to D7 please?
Would love to use the token-replacement also in D7.
Thanks a lot in advance for your reply in advance.
Greetings, Martijn
Comment #26
letapjar commentedThe patch in #17 works great - please commit to the next point release.
Comment #27
merlinofchaos commentedCommitted and pushed.