I've been using this module over a year and it's been working great. One aspect that I'm unable to figure out is when someone is viewing a comment (example.com/comment/%) on a node type that has been configured to have a unique theme. It seems to always default to the main theme.

I can add this rule below which switches the theme, but it does this on a global scale.

drupal:path = comment

I can confirm (for node types) that the comment edit, comment reply, and comment delete all work, but tried several theme switching combinations and can't get comment view to work.

Am I missing something simple here or is this not supported?

Comments

mkalkbrenner’s picture

Please post a screenshot of your rules and the output of ThemeKey Debug on such a page.

gratefulsk’s picture

Hi mkalbrenner. I had one rule which was "node:type = video" and when viewing the Debug results it seemed to not grab any node data. To reiterate, the issue was only when directly viewing a comment (example.com/comment/123) from that node type.

I was able to get it working by adding another themekey_comment_path in /themekey/modules/themekey.comment.inc line 54

$paths[] = array('path' => 'comment/#comment:cid');

I know that modifying the modules code is highly frowned upon, but I had to get it working quickly. For me, this change now makes viewing comments (example.com/comment/123) to switch themes if the node type has a rule applied to it.

mkalkbrenner’s picture

Component: Miscellaneous » Code / API
Assigned: Unassigned » mkalkbrenner
Category: Support request » Bug report
mkalkbrenner’s picture

Title: Change theme for viewing comments on specific node types » Path comment/#comment:cid does not populate comment:cid property
Status: Active » Needs work
mkalkbrenner’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.