I am trying to use themekey to apply a theme just to the views master display. I have tried using view;human-name with no luck.
I want the theme to just apply to the view on the page and not effect the overall theme. Just want a specific theme for a view on a page.
Does anyone have any insight on this or anything I am missing?
I have tried:
VIEWS:HUMAN_NAME
Description
Views: Human Name - The (human readable) name of a view
Page Cache
Supported
VIEWS:MACHINE_NAME
Description
Views: Machine Name - The machine name of a view
Page Cache
Supported
Comment | File | Size | Author |
---|---|---|---|
#11 | themekey_views-2280669-11.patch | 771 bytes | markabur |
Comments
Comment #1
mkalkbrennerJust enable ThemeKey Debug to see the values of the properties you have to use.
Comment #2
mkalkbrennerComment #4
attisansry for reopening this issue - but the debug reports "empty" for all views:[] entries no matter what I do. could you point me into the right direction?
greets, attisan
Comment #5
mkalkbrenneryou have to go to the views' page where you can see the output of the view. At the bottom you'll find ThemeKey's debug information related to this page. views:human_name, views:machine_name and views:vid should not be empty.
1
Comment #6
attisanwell, they are :-( empty on edit pages and on any views generated page.
Comment #7
mkalkbrennercan you post the complete debug output of such a page?
Comment #8
attisanafter playing around I found the bug - views pages using placeholders ("%" for the contextual filters) don't work. the debug output for views with static paths works like described. however, I think this should be considered a bug.
this bug holds true for the actual theme-key rules too.
greets, attisan
Comment #9
attisanhere is a quick and dirty fix (file /modules/themekey.views.inc)
beware the shortcoming: does not support multiple pages per view (multiple urls per view).
greets, attisan
Comment #10
ksenzeeIn themekey_views_get_simple_property_by_getq(), Themekey tries to fetch a view's URL to match it against $_GET['q']. Unfortunately all it's getting back from the view is the URL for its default page display. If you have multiple page displays, with paths like "blog/category" and "blog/author", the Themekey rules you set up for the view won't be triggered.
One solution might be to add the ability to set up individual rules for each display, so you can specify "blog:page_1". This would let themekey_views_get_simple_property_by_getq() load the display in question and fetch its URL instead.
Comment #11
markabur CreditAttribution: markabur commentedHere's a patch that incorporates #9.
Comment #12
markabur CreditAttribution: markabur commentedAlthough the patch works for the parameterized views I was having trouble with, it causes problems for non-parameterized views.
I'm un-patching my copy of themekey and using a regex in the themekey rule instead.
Comment #13
pbuyle CreditAttribution: pbuyle commentedCould
views_get_page_view()
be used here? Or does theme key happens too early?