Hi,
It would be great to apply '*' character as wildcard.
To target any path like /activity/* for every activity page.
Cheers,
Hi,
It would be great to apply '*' character as wildcard.
To target any path like /activity/* for every activity page.
Cheers,
Comments
Comment #3
webfaqtory commentedAdded wildcard to include paths.
Comment #4
webfaqtory commentedComment #5
tea.time commentedHi @webfaqtory,
Thanks for this module!
I think there's a partial bug in this implementation - it does not seem to work with path aliases, both individual aliases and patterns of aliases.
For example I tested the pattern "/locations/*" and I have nodes with aliases that begin with "/locations", but if I check `$current_path` on one of those nodes pages, it's the system path "/node/[nid]", so it fails to match.
I was hunting in the API for how block visibility rules do this check, and found this RequestPath condition plugin, which I'm guessing is it:
https://api.drupal.org/api/drupal/core%21modules%21system%21src%21Plugin...
See the `evaluate()` method, which retrieves the path alias as well, and checks both system path and alias with PathMatcher. I'm not sure how to use a condition plugin directly but you could borrow some of the logic from that method.
Hope this helps :)
Comment #7
webfaqtory commentedAdded a check to the path for an alias