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

    maybe I miss something but I tried to make a tv visible on certain pages only and get to no result.
    My first problem is to create a rule with a correct constraint to affect a certain page only. According to the docs I used the following params:

    Action: core-resource/update
    User Group: A certain user group of my installation

    Field: tv9 (tv with id 9)
    Containing Panel: modx-panel-resource
    Rule: tv visible
    Value: 0 (for testing to just hide it from that page to see if it works, should finally be 1 )

    Constraint Class: modResource
    Constraint Field: id
    Constraint: 2 (page id 2)

    The result is that the tv now is hidden from ALL pages. Seems my constraint settings are not working. Do I have entered the wrong values?

    The second question is how to show the tv for certain pages (defined by id) only: Since all tvs are visible for all pages by default, I don’t think I can just set the rule-value to 1 for visibility, right? Thus, do I have to create a first rule that hides the tv from all pages first and then create a second rule to make it visible for the pages I like to have the tv visible?

    Thx for help.
      • 36425
      • 49 Posts
      i have same question... is it real?

      dont work constraint with tvs!

      maybe here is an example of plugin with wich i can do it?
      • I've had the same problem; it doesn't appear to work as expected. Any constraints will apply to all resources, not just the one specified.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 3749
          • 24,544 Posts
          Did you try modx-panel-resource-tv instead of modx-panel-resource?


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            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
          • I've tried leaving the TV in the modx-panel-resource-tv region, nothing changes. Rule still applies to all pages.

            Using MODx 2.2.4-pl (traditional)
              • 40045
              • 534 Posts
              This seems quite a big issue...tried the same with no success...maybe we're not getting the intention behind the constraints right??

              my use case would be a scenario where I would show a certain TV only on one page (Home page) and not on the others (in the backend), but for now I just tried to hide that TV only at the Home page via form customization, at the moment it looks like this:



              but when I deactivate the TV that should be hidden only on Resource with ID = 1, then the TV is just hidden for all resources...

              somebody knows if there's already a bug filed for that issue (if it's one)?? Made one... http://tracker.modx.com/issues/9012

              EDIT: I use Revo 2.2.5pl [ed. note: exside last edited this post 11 years, 5 months ago.]
                • 41840
                • 3 Posts
                having the same issue
                • Bryte Digital Dialogues Reply #8, 11 years, 5 months ago
                  Hi, will this be fixed for the next version 2.2.6?

                  Thanks
                    Web development (Barcelona, Spain)

                    ..............................................
                    Bryte Digital Dialogues
                    ..............................................
                    Calle Nicaragua 48 5º 5ª,
                    08029 Barcelona, Spain

                    [email protected]
                    T +34 93 419 64 39

                    www.bryte.es
                    www.bryte.nl
                  • Bryte Digital Dialogues Reply #9, 11 years, 5 months ago
                    In think I have found a "Work arround":

                    1. Create new profile (example: only show certain TV for specific resource)
                    2. Create new set
                    3. Create a new tab, and assign TV with your constrain (rule). Let´s say only for resource with id = X
                    4. Show or hide TV ( in my case only show when resource id = x)
                    5. Set the region. (title from the new tab)
                    6. Activate

                    Go back to you first set and put "modx-panel-resource-tv" invisible.


                      Web development (Barcelona, Spain)

                      ..............................................
                      Bryte Digital Dialogues
                      ..............................................
                      Calle Nicaragua 48 5º 5ª,
                      08029 Barcelona, Spain

                      [email protected]
                      T +34 93 419 64 39

                      www.bryte.es
                      www.bryte.nl
                      • 40045
                      • 534 Posts
                      Seems quite interesting, but I could not fully follow =),

                      I'm stuck at step 3 where I should add the constraint, cant find this in the TV tab of the set-settings^^... could you eventually make some screenshots (picasa or so is nice to host them, see mine above)? [ed. note: exside last edited this post 11 years, 5 months ago.]