I need a specific theme for the node edit of a content type. The create node page is easy, simply enter the create node path. But the edit path has no set pattern, how do I set a theme for it?

Thanks.

CommentFileSizeAuthor
#10 619940.png8.66 KBmkalkbrenner

Comments

mkalkbrenner’s picture

Version: 6.x-1.x-dev » 6.x-1.2-beta2
Status: Active » Fixed

That's easy.
Go to the path settings of ThemeKey at /admin/settings/themekey and add a new path:

node/#node:nid/edit
Flying Drupalist’s picture

Status: Fixed » Active

Where do I set the content type?

mkalkbrenner’s picture

Assigned: Unassigned » mkalkbrenner

The solution should be something like
Path: node/#nid/edit Conditions: node:type=story

Unfortunately it doesn't work due to an issue in ThemeKey's architecture. I already have a working version here but it requires some more testing before releasing 6.x-1.2beta3. So stay tuned ...

mkalkbrenner’s picture

Title: Setting theme on node edit of content type » Allow themekey properties as conditions for themekey paths
Component: Installation / Configuration » Code / API
Category: support » task
Flying Drupalist’s picture

Thanks a lot. :)

mkalkbrenner’s picture

Status: Active » Fixed
mkalkbrenner’s picture

Status: Fixed » Closed (fixed)
Flying Drupalist’s picture

Version: 6.x-1.2-beta2 » 6.x-1.2-beta6
Status: Closed (fixed) » Active

Hi, this is not working for me. I have:
path:
node/#/edit

conditions:
node:type=story

also tried:

node:type='story'

Removing the conditions sets all the node edits. Adding the conditions does not work.

Also what would I do if I wanted to set the theme for 2 different types? Like this:
node:type=story node:type=page
?

Thanks.

Flying Drupalist’s picture

Category: task » support
mkalkbrenner’s picture

StatusFileSize
new8.66 KB

I tested the feature again with beta6. It works.
If you want different themes for editing different node types you have to setup a single rule per node type.
Please see the attached screen shot.

If it still doesn't work on your system, there must be another reason:
- another ThemeKey rule that is more powerful
- a theme configured to a node using ThemeKey UI
- an admin theme used for editing nodes configured at /admin/settings/admin
- ...

Flying Drupalist’s picture

Version: 6.x-1.2-beta6 » 6.x-2.0-alpha1

Thanks for your help. I updated to the 2.0 version, fantastic work btw, the UI looks much better.

Anyway it is still not working for me.

Property is drupal:path

Value is node/#nid/edit

conditions is node:type=image

With nothing in conditions, all node edit pages are set to the theme I want. With the node:type=image no page is set to that theme.

I'm not sure if this is related, but this path is also not working for me(for images like: images/cars/version2/big/edit):
image/%/%/%/edit

Meanwhile this works fine (for images like: images/cars/edit):
image/%/edit

mkalkbrenner’s picture

Category: support » bug
Status: Active » Fixed

Thanks for testing the first alpha version. You discovered two bugs:
1. no other node properties than node:nid are working
2. algorithm to build path ancestors returned incomplete result

I hopefully fixed both and released alpha2 some minutes ago.
It would be nice if you test again.

BTW If you install ThemeKey Properties and turn on it's debug mode you'll see all path ancestors for a page.

Flying Drupalist’s picture

Thanks for your help and the great module. Works as expected now.

Status: Fixed » Closed (fixed)

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

Flying Drupalist’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.0-beta3
Status: Closed (fixed) » Active

I'm getting this after updating to the latest beta.

# 1) You entered two identical theme switching rules in the chain
# 2) You entered two identical theme switching rules in the chain

mkalkbrenner’s picture

Can you attach a screenshot?

Nevertheless, your configuration should still work. But the error indicates that your rules could be simplified.

mkalkbrenner’s picture

Status: Active » Closed (fixed)