Hi guys, I need some help

I need to configure Themekey to do the following:

Use a specific theme for the user page of the logged user... but a different one when they see other user's page

So when a user check's his own page it's blue. But when he checks a different user's page it's red. And a third theme for all other pages...

How can I achieve this with the rule chain? I can't seem to figure it out
Is there support for tokens? I tried doing something like: drupal:path = user/[user:uid]
But it doesn't seem to work

Basically it's a way to implement 3 themes: Regular Theme, My Page Theme and Other Users Theme

Really need help on this, thanx
Jawni

Comments

mkalkbrenner’s picture

I can't seem to figure it out
Is there support for tokens? I tried doing something like: drupal:path = user/[user:uid]
But it doesn't seem to work

There's no support for tokens but you can achieve that by cascading these rules:

drupal:path = user/%uid
    drupal:path:wildcard uid = 27 >>> user_27_theme

or

drupal:path = user/%
    user:uid = 27 >>> user_27_theme

Alternatively you can use ThemeKey UI and ThemeKey User Profile to assign a theme to all content created by a user.

But everything gets complicated when you want all users to see their own content in blue and foreign content in red.

In this case we need a rule like

user:uid = [current_user] >>> blue

Such a feature is not implemented at the moment. Maybe this should be turned into a feature request. But we need to be carefull regarding the performance and try to not break caching.

mkalkbrenner’s picture

Category: task » support
Priority: Critical » Normal
Status: Active » Fixed

no response for weeks

Jawni’s picture

Hey mkalkbrenner, thanks a lot for the answer!

The problem was exactly that I wanted every single user to view their page as red and the others as blue. Had to solve it by using blocks with JS code in them, and use PHP visibility settings

Status: Fixed » Closed (fixed)

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