Download & Extend

Make priority of include and exclude pattern matching configurable

Project:External Links
Version:6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I would like to be able to configure that the include pattern has priority over the exclude pattern.
The module now assumes the opposite.

Anyone that could point me in the right direction to start on this? Or this is a really bad idea?

Comments

#1

Title:Make prioiry of include and exclude pattern matching configurable» Make priority of include and exclude pattern matching configurable
Status:active» needs review

weseze,

I also agree that the "inclusion" of certain links as external should trump those links "excluded" (and therefore considered internal). It strikes me that a user is less likely to desire an internal link to be considered external, so these special cases should be given priority in the logic. Furthermore, by listing "Exclude links matching the pattern" first in the UI, the impression given to the user is that the this regex will be evaluated first and then the "Include links matching the pattern" will be evaluated, so that a URL matching both regex would ultimately be considered external.

If there's disagreement on this issue, then rather than committing a patch like the one I propose (attached), we could easily add a radio group in the admin UI asking which regex should be given priority. Wouldn't be hard at all.

Thoughts?

AttachmentSize
regex_logic-1206276-1.patch 863 bytes

#2

I'd prefer to avoid adding an option and stick with the approach that seems to make the most sense. I'm fairly sure I didn't give as much thought to this as you have, considering I don't think I've ever used the inclusion/exclusion patterns at all, they were added by feature request. Let's just get some appropriate testing on this and we can add it to the next version.

#3

Great. Thanks, quicksketch!

Test this patch, folks!

#4

I found I was able to work around this problem by installing the Menu Attributes module.

#5

Status:needs review» active