I am trying to assign a certain theme to two or more taxonomy terms. Do I need to specify two rules (one for each tid), or can I input more than one term ids in the field by ... say comma separated values?

Comments

mkalkbrenner’s picture

It's not possible to enter multiple tids for property taxonomy:tid. You need to setup many rules.

But have a look at the ThemeKey add on Taxonomy Theme. Maybe it fits your needs.

klonos’s picture

Title: Is there a way to insert multiple parameters? » Support multiple parameters in fields (to avoid adding multiple/unnecessary rules)
Category: support » feature

ok... here's a feature request then ;)

For example, if term id is chosen as a property, then possible values could be:

1,2,3 comma used as an OR, meaning any of the values.
1-4 dash used as a from-to, meaning all values in between as well.
1+4 plus used as an AND, meaning the node needs to be tagged with both term ids (makes sense with tids that are actually numbers - haven't thought if it does for other properties as well)

Of course mix-n-matches would be allowed:

1,2,3,8-12 meaning 'node may be tagged with 1 OR 2 OR 3 OR any tid from 8 to 12'
1+8-12 meaning 'node must be tagged with 1 AND any tid from 8 to 12'

Also changed issue title.

I already knew about taxonomy_theme, but in the project's page it says:

Related Projects - ThemeKey offers a better approach to switch themes.

So I thought that themekey was some sort of 'one ring to rule them all'.

mkalkbrenner’s picture

I changed the project description of taxonomy theme.

1+8-12 meaning 'node must be tagged with 1 AND any tid from 8 to 12'

1+8 could be achieved by nesting ThemeKey rules.

I'll think about you request ...

klonos’s picture

Than you, I know it can be achieved by using nested rules, but the point is to make it easier to maintain rules...

Today I had a really bad experience trying to delete a dozen rules, so I created #766592: Support bulk delete of rules in the Theme Switching Rule Chain. Most of these rules could have been omitted if what I propose here was supported. I could then have simply edited one rule instead of deleting + confirming deletion of a dozen of them. I am not saying it should replace the old way of using nested rules where possible. I am simply requesting this as an extra way so that advanced users can avoid adding extra rules by using this regex-kinda way.

I am simply laying an idea down on the table here. What I propose is not perfect (the 1+8-12 for example is really ugly and could be 1+(8-12) or something). We should first wait for other people to provide some input before trying to implement anything.

As I said, thanx in advance for considering this one.

mkalkbrenner’s picture

Status: Active » Postponed
mkalkbrenner’s picture

Due to the fact that nobody has time to implement this nice to have feature I close to issue to clean up the queue.
Fell free to re-open it if you can provide a patch or order a maintainer to work on it.

mkalkbrenner’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)