3

I am using panel to show the content and i am using view.I am creating a forum and want the link based upon argument when i am creating view and giving some context ,in preview it is working fine but when i am trying to rum wirh url no value is coming can any one tell what I am doing wrong.thanks in advance.

2 Answers 2

3

In order to use "contextual filters" for a view within a panel, you need to change the style of the panel. It seems that even though they are called contextual filters, they expect an argument. Make sure you have the view panes enabled in modules and create the same view with the style of view pane. You will then get an additional menu called "pane settings". One of the settings is "argument input", select "from context" and the required context, and it should work fine. This was something I was really stuck on till found this solution.

also, if you are trying to pass a taxonomy term, you have to make sure it is formatted correctly to use in the filter. See this post for details

Views contextual filters taxonomy name

1
  • So if i'm using Node: ID as a Context in my Panel, why do I not see that option in my Contexts in my View Pane?
    – AlxVallejo
    Jun 1, 2014 at 17:52
2

If you don't want to recreate your view then an easy way around this is simply to set the Panel Page's argument to a generic string type, so that the unformatted taxonomy term name from the URL is passed directly to the View's contextual filter, and the hyphens in the URL are converted to spaces by Views (assuming you have that contextual filter option enabled) and not touched by Panels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.