1

I've overridden the User profile template to display custom fields for the user view in Panels, I need to have a View listing with a filter of user comments by 'date' or 'conversation' this I am comfortable with only problem is the filter results list very different info. My approach in resolving this is to have two separate views and create two dynamic links to filter by 'date' or 'conversation'.

I know I can create two variants within the one panel or alternatively two separate panel panes which can accept arguments; only problem is Im not sure what to pass to have one panel pane or panel variant override the other. So when user clicks on 'date' variant x loads when user clicks on 'conversation' variant y loads, or something like that..

Do I achieve this using 'selection rule', 'contexts' or what? Please help...

0

You can either use two variants or different view panes on the same variant. It is just an organizational choice.

If you use two variants, use Selection rules to distinguish them. For example, on one of my sites, I have two variants for the user profile, depending on whether the logged in user is viewing his/her own profile or another user's profile. I distinguish between these two variants using a Selection rule of logged in user != user being viewed.

Alternately, within the same variant, you can use multiple content panes (created in Views). You can choose which of these are shown by clicking in the upper right corner of the respective pane (within the Panels UI) and adding Visibility rules. Why would you use this approach? If you only have a few panes. In my case, I used two variants instead because I had about twenty different view panes on the user profiles, and it was simpler to set two Selection rules then 20 Visibility rules.

So in short, my recommendation is: Use different variants with selection rules when you have lots of different items. Use a single variant with visibility rules when you only have a few items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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