Closed (fixed)
Project:
ThemeKey
Version:
6.x-3.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
3 Mar 2010 at 19:47 UTC
Updated:
23 May 2012 at 14:35 UTC
Thanks for this module - I use it quite heavily on my site. The 2.0 version is a great improvement! I wondered if it were possible to integrate with the Views module, in particular for a page display. Right now I am primarily using taxonomy or NID for triggers, but I can't use those triggers for views-generated pages (right?). So I think the only option I have here is path, which I've found to be a bit less reliable and a second step that I sometimes forget. Or is there another way that I can more reliably and easily choose a theme for a page generated by views?
Thanks!
Comments
Comment #1
ruminir commentedHi, I would like to know how to set all nodes generated by a View using ThemeKey Module?
My issue:
I have two Views with differentes themes and path, BBC/ ESPN/ , then both views generate a list of nodes, so I have sometimes the same nodes in each list but with differents themes, my ask is how can I set the same themes of the views for all nodes that its views generate, example:
BBC/michael-jordan has the same node that ESPN/michael-jordan but differents themes, because both nodes contents are generated by differents views.
Thanks in advance for your help.
Ruben
Comment #2
michellezeedru commented@ruben-mini: I don't think we're asking for the same thing, if I understand your question correctly. I would like to specify a theme using themekey for the actual page is generated by views -- the page that contains the list of nodes -- in some way other than by path. As best as I can tell, the only way to do this is by path.
It sounds like you would like the theme to be selected based on the results of the views query for the page -- no idea how to do that. Sounds complicated, as there surely can be several themekey-selected themes from the list of nodes. Which one would it choose, the first node in the query?
Anyway, that is different from what I'm asking for in this feature request.
Comment #3
fbackelj commentedI am also having an issue with Themekey and Views...
I have an image gallery, which is generated using a view. Since the images use a taxonomy term (from the "Image galleries" vocabulary), I can easily theme all images. However, this does not set the same theme for the view with the gallery of thumbnails (e.g., image/tid/1) - I have to set this explicitly using its path.
It would be nice if one could couple a theme to a view, here the gallery of thumbnails. Likewise, it would also be nice if the linked images nodes would also use the same theme. However I don't know whether it the latter is possible, because I think there's no connection anymore between the node that is being viewed and the view in which that node was selected.
Regards,
Franky.
Comment #4
leoklein commented+1 on the suggestion. I wish I could set the theme when putting together a View.
Comment #5
tommann commentedI am not having any luck integrating it with my views generated pages which are using an argument. I tried path but have no luck so far. The is the generated path
http://www.promotingschools.org/schools/agency/27 (27 is a variable)
and in ThemeKey I am using
drupal:path = %/agency/% and trying to switch to Zen theme
Any thoughts?
Comment #6
mkalkbrennerPlease turn on the ThemeKey Debug module and than "Show values of ThemeKey properties" and "Trace ThemeKey rule switching" at /admin/settings/themekey/settings/debug.
Post the ouput at the bottom of on http://www.promotingschools.org/schools/agency/27 if you logged in as user 1.
Comment #7
carsten müller commentedHi,
i'm going to think how to integrate themekey for views. In the meantime use themekey debug and fetch the path for rule switching.
I don't think it is possible to use the theme set for the view for further node displaying. First we are going to concentrate to implement the integration to views
Comment #8
carsten müller commentedthere is a new property named views:vid
There you can enter th vid of the views. If the view has a path the path is checked against the view and the them will be switched if it is matching.
It is just a beginning, i tried the integration into the views but it is very complex.
For the moment there is the possibilty to enter a rule for the path or for the vid.
Comment #9
carsten müller commentedonly implemented in 7.x-1.x-dev
Comment #10
kfritscheOn the train back yesterday from Drupal 7 Sprint Camp, i have a idea and did a little bit of digging.
For now i doesn't found a solution how to add a setting to views, for now iḿ not sure if some module does it before?
What i tested was to add a handler, so you can add a theme switcher to the views header, where you can define the theme you want to use for this view and which add automatically a themekey rule for the current view:vid. (other way is to add a static rule like themekey_ui does it for nodes and user)
The problem for this is, i do not know how you can limit the handler to only one per view. Otherwise you can add two and more handlers and then you have duplicate rules... So there is a lot of more digging to do in views.
Comment #11
tommann commentedI spent a few days playing with this, I have used panels to aggregate the views and that works well with themekey.
I can now use my sub-theme to display the page.
http://www.promotingschools.org/schools/agencylist/27
using Themekey "drupal:path = agencylist/%"
Then using views I used the node argument (Node ID from URL) for each element and panels to compile the 6 parts together.
I am using blocks to hide the top banner and main menu from the sub-theme path.
http://www.promotingschools.org/schools/node/15
This is in 6x-3.2, it would be nice to be able in the future to address a view directly with Themekey but panels is quite a good work-around.
Comment #12
mkalkbrennerUnfortunately we don't have time to backport this stuff to d6
Comment #13
tommann commentedThanks, we moved on to D7 as well