Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
recetly I found your great module and it took me a while to discover the way to achieve really simple (and widely-used) use case:
- switch theme according to path alias
Then I went through your docs and examples and at the wildcard paths I found only TODO :-D Please use this image as an example - found it in issue queue.
Comment | File | Size | Author |
---|---|---|---|
#4 | themekey_mystery_box.jpg | 30.05 KB | Michael Ware |
foo-rule.png | 9.77 KB | xbery |
Comments
Comment #1
ShaneOnABike CreditAttribution: ShaneOnABike commented+1 it's not that easy to understand :/
Comment #2
mkalkbrennerThe feature is documented within the help section in included in the module:
The important part is
But you're right that this is sophisticated stuff and an exmple / tutorial is required. That's the TODO you've found.
If anyone has some time to spent on such a tutorial, you're welcome!
The screenshot you mentioned is not suitable because it uses a regular expression which is to complicated to understand for beginners. In this screenshot '/' are the delimters of the regex and have nothing to do with the path.
Comment #3
patoshi CreditAttribution: patoshi commentedi still dont get it.. what do i put when i choose path:wildcard there are 2 input boxes.
I am trying to match these two:
/procure
/procure-sell
/procure-store
I'm trying to do this: procure%
but that doesnt work it seems. wildcard needs more documentation as its quite confusing.
Thanks and great work~!
Comment #4
Michael Ware CreditAttribution: Michael Ware commentedI keep reading/hearing that Themekey has wonderful documentation, but I can't find it anywhere. I don't see all of the examples featured in the Mustardseed tutorial, http://mustardseedmedia.com/podcast/episode52, Any suggestions, both online or somewhere in my admin section?
More specifically, I would like to set a wildcard alias for all URLs in a given directory so that they use the same theme, but am not sure how to configure the settings.
Ex: www.example.com/apples and /apples/* should have the apples theme. I know to use % instead of *, but still not getting anywhere.
drupal:path:wildcard mysterious empty box = apples/%
What goes in the mysterious empty box?
Thx.
Comment #5
mkalkbrennerThe documentation is included in the module itself. Please check the Help section of your drupal installation.
In your case, the rule is simple:
This one matches "/apples" and "/apples/*", if you think of natural wildcards and paths.
Please note that a wildcard like "*" dosen't exist in ThemeKey. I know that it might be difficult to understand but that's how drupal's internal menu / path system works.
The mysterious empty box after drupal:path:wildcard is for "named wildcards" previously declared in a drupal:path rule. But please check the documentation for that.
Comment #6
Michael Ware CreditAttribution: Michael Ware commentedGreat. Thx for the reply!
Comment #7
mkalkbrennerI close this issue to clean up the queue. But we have to keep this in mind when writing the handbook ...
Comment #8
reallyordinary CreditAttribution: reallyordinary commentedWildcard paths still don't make a lick of sense. Cannot make heads or tails of the help text.