Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Page Manager
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2011 at 02:53 UTC
Updated:
15 Feb 2013 at 20:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedYou only have a block display, which makes it much more difficult to actually pass data. How are you trying to pass this content type to the view?
Comment #2
merlinofchaos commentedComment #3
mstrelan commentedMy page variant of node/%/view is attached. The content type argument is passed in the bottom pane.
Note that my view now also has a third argument to exclude the current node.
Comment #4
merlinofchaos commentedHm. For entities we're using core tokens, which is how things get converted. Dave Reid tells me that token.module provides a machine name -- are you using token.module? You may need to for this.
Comment #5
mstrelan commentedI do have the module enabled, not sure if I'm using it in this instance.
The reason I thought it may be using a human readable name is that I added "new custom content" to my page and entered something like %node:content-type and it printed "Dining outlet" instead of "dining_outlet".
Comment #6
merlinofchaos commentedThe actual token for the machine name is %node:content-type:machine-name I believe.
Comment #7
mstrelan commentedThanks but that didn't work. I went in to page manager, edit the content of my variant, edit the settings of my view pane. There I changed the select list for the Content Type argument to "No Context" and in the Arguments text field I entered %node:content-type:machine-name. The view did not display. Still so far the only way that works is to enter the actual machine name in to the aforementioned text field. The only success I did have was that adding a custom content pane with %node:content-type:machine-name displayed the actual machine name instead of the human readable name.
PS. In these situations where I have provided more info do you want the status set back to "active" or should I leave this for you to change?
Comment #8
merlinofchaos commentedDefinitely back to active.
I think I may finally understand what is wrong here. This patch should allow you to make this work.
This patch relies on a commit I *just* pushed, so you will have to apply this to a very recent -dev.
Comment #9
merlinofchaos commentedWhoops. I hadn't saved a file. This patch is better.
Comment #10
mstrelan commentedThere is a bracket missing at the end of the addition to
views_content_views_content_type_render(). Updated patch attached.I have tested this with a views page display displayed in a panel with the content type argument passed from the node panel context. This worked perfectly. I have not tested with pane display and not quite sure what the view_from_argument hunk is for, but I imagine they should work also.
Comment #11
njivy commentedThis bug bit me, too. When will it be included in a stable release?
Comment #12
zabelc commentedThis just bit me as well...and I was unable to get the patch above to resolve the issue.
I'm putting %node:content-type:machine-name into the argument, and it's not recognized by views at all. I'm printing out the argument in the "No Results Behavior", and I get "Club News:machine-name == Content: Type input". Thus it looks like it's being a bit too greedy in it's evaluation of the token string.
Comment #13
merlinofchaos commented#12 would be an unrelated bug to this. The patch itself is one I actually thought I had already committed and did not. I feel bad about that.
In any case, committed and pushed!