Closed (fixed)
Project:
Panels
Version:
5.x-2.0-beta2
Component:
Panel pages
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2008 at 04:22 UTC
Updated:
24 Apr 2008 at 04:51 UTC
Sorry if this is a noob question, but how does one go about putting an arbitrary CCK field into a panel? I've gotten a CCK *group* to work, and also a node in it's entirety... but I can't for the life of me figure out how to grab just one or two CCK fields and display them in a panel.
(The context is: building a user profile page with Advanced Profile. I'd like to pull the "City" and "Country" fields out of my "Location" CCK group, and display only those... and other similar tasks.)
Comments
Comment #1
niklp commentedsubscribing cos I didn't know you could even do this...
Comment #2
nevets commentedWhat about making a list/table view that uses user id for that argument, returns only fields you want and is filtered by the approriate content type?
Comment #3
meeotch commented@nevets - sounds like a possibility. Could be overkill / slow? I'm not sure. I'll probably test this in the meantime. Any idea how to pass the argument to the view from the panel page? I'm pretty new to this.
I know there's a programmatic way of doing this, with template files + mini panels + who knows what else... but digging through the Advanced Profile module, the method is convoluted enough that I'm lost. I was hoping a simple example existed somewhere.
Comment #4
keithmorr commentedI used CCK Blocks module to create blocks for all CCK fields and then they can be easily added to the panes.
There seems to be a problem with my newest installation of the Panels Module though. This worked perfectly until I updated the module, but now panels does not shows these items available to add to the pane!!!
Comment #5
merlinofchaos commentedgordonh submitted a patch here: http://drupal.org/node/97375
The other way is to use the panel identifier to create arbitrary node.tpl.php files.
In your _phptemplate_variables() function of template.php in the 'node' section, you can put:
Once you have that in the right place and working, you can then put 'foo' in the panel identifier of the 'node content' pane, and it will use node-panel-foo.tpl.php automatically. You can then use that template to print out any single item from $node->content that you like. It's a bit of a pain, I realize, but it's what we've got right now.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.