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.
There are some cases when it would be good if ng_lightbox could check if the internal path of an alias path matches the patterns rules, when checking if that link should link to an ng_lightbox.
For example, you may set the rule where all the paths that matches "node/*" should link to ng-lightboxes. But your paths are allready alised (e.g. /home instead of /node/1), in this case the path don't match the patterns.
Comment | File | Size | Author |
---|---|---|---|
#6 | aliased_paths_not-2771255-6.patch | 1.38 KB | radubutco |
|
Comments
Comment #2
radubutco CreditAttribution: radubutco commentedThe code checks if the path has an alias which matches the patterns.
I've added a code which check if the path which is allready an alias and the internal path matches the patterns.
Comment #3
radubutco CreditAttribution: radubutco commentedComment #4
benjy CreditAttribution: benjy commentedThis looks good thanks!.
Lets also add a test and then we can get this committed.
Comment #5
mariancalinro CreditAttribution: mariancalinro at Dream Production commentedSetting it to NW per benjy's comment.
Comment #6
radubutco CreditAttribution: radubutco commentedA new condition was needed to the previous patch, because the path for home page has always link to nb_lightbox.
Comment #7
benjy CreditAttribution: benjy at PreviousNext commentedDo you want to try add a new test here and we can get it into the next release?
Comment #8
NWOM CreditAttribution: NWOM commented#6 works great. Thank you! Also for those on D9 that need a a compatible patch with #3150684: Add D9 compatibility for NG Lightbox, I have made a temporary fix. I'll hide the file, since it should not be committed.
Comment #9
NWOM CreditAttribution: NWOM commentedNever mind. #6 has a problem with multilingual sites. If you use the path /*/node/10 to include all languages as an example, it does not work for aliased nodes still.
Edit: It also doesn't work with non-aliased URLS without wildcards. For example: /en/node10.