We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36818
    • 119 Posts
    Hi,

    is there a way to define a constraint in a rule set of FC that does define a excludes?

    E.g.
    It is possible to define
    modResource.resource = 12


    What I want:
    modResource.resource != 12

    Applies to all resources, except resource=12.

    Is this achievable?

    Thanks for your help.

    f.

    This question has been answered by michelle84. See the first response.

    • discuss.answer
      • 19328
      • 433 Posts
      Unfortunately, no. But you can accomplish almost the same by creating a default FC-rule which is used by all resources, and then create a FC-rule just for resource 12. It will overrule the default one.
        • 36818
        • 119 Posts
        Thanks, Michelle for this suggestion.

        I tried:

        • Two different FC-profiles with one set each: 1. hide all TVs, 2. show TV with constraint
          modResource.resource = xy
        • One FC-profile and two sets: 1. hide all TVs, 2. show TV with constraint
          modResource.resource = xy

        Both way didn't gave the result I wanted.

        BTW: using MODX 2.4.2

        What did I missed?


        Quote from: michelle84 at Jan 20, 2016, 10:35 AM
        Unfortunately, no. But you can accomplish almost the same by creating a default FC-rule which is used by all resources, and then create a FC-rule just for resource 12. It will overrule the default one.
          • 3749
          • 24,544 Posts
          Which order you create the rules might make a difference.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 36818
            • 119 Posts
            Quote from: michelle84 at Jan 20, 2016, 10:35 AM
            Unfortunately, no. But you can accomplish almost the same by creating a default FC-rule which is used by all resources, and then create a FC-rule just for resource 12. It will overrule the default one.

            I really don't know why it is not working. But thanks anyway, I think I have to test it more thoroughly.