New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • Bryte Digital Dialogues Reply #11, 6 years, 3 months ago
    Sorry you´re right. You have to put the constraint when you create the set.

    Check the screenshots:
      Web development (Barcelona, Spain)

      Bryte Digital Dialogues
      Calle Nicaragua 48 5º 5ª,
      08029 Barcelona, Spain
      T +34 93 419 64 39
    • Wow, thank you very much for this help, will try it again in the next few minutes =)! People like you is what makes MODx stand far ahead of it's! so thanks again...

      I have two additional problems though =)...

      1) I'm using the system setting TVs below content, so the additional Tab is not convenient for existing users
      2) I'm using a MIGX Grid (actually two of them) and these are not fetched correctly into the tab, it just pulls all the MIGX grids into the tab instead of only the one for the slides^^...

      think i'm giving up on this =P, would be nice, but it's not worth the time i already spent on it!
      • Bryte Digital Dialogues Reply #13, 6 years, 3 months ago
        I hope it work out! smiley

        I´m also using MIGX Grid and it gives me also a lot of issues...:( Did you try it it in different browsers?
          Web development (Barcelona, Spain)

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

          T +34 93 419 64 39

        • No, didn't try in different browsers, just newest chrome, but I don't think that it's a browser issue (just guessing). In this actual projekt I even use MIGX in MIGX and normally this great extra doesn't make big problems for such a complex thing =)
          • So what exactly is the point of the constraints if the rules get applied to all resources? It looks like they are useless. I want my 4 hours back.

            • Hi,

              Seems it's still not working on 2.3.1 version sad
              • Let's not let this thread die, people, it's just way too big of an issue.

                The scenario: you want to create a TV, attach it to a template, and show it on certain resources while hiding it on others.

                The issues:

                1. Constraints are, well, constrained. You can only have one value per constraint, and only one constraint per rule-set.
                2. Form customization constraints are backwards:
                  You can't hide a TV on all pages, and then override it on certain pages with a constraint - because - the first rule without any constraints (that hides the TV on all pages) takes priority and cannot be overridden. Is this a bug or expected behavior?
                3. This means that in order to show a TV only on certain pages, you have to create a rule-set with a constraint for EACH page that you want to hide the TV (that's backwards and completely unacceptable).
                4. Template sprawl: in order to easily achieve the results we want, which is certain TVs on certain resources, we have to create a duplicate Template and assign those TVs to the template. If you ask me, anything more than 8-9 Templates for a site is overkill and becomes unwieldy to keep updated.
                5. According to the original documentations/developers, a Template Variable is so named because it is an inextricable part of a Template. This is true (you can’t have a TV without a Template), however, a TV doesn’t actually need to be shown via a Template - it can be used by just about any resource field, a snippet, or even another resource as a filter. It definitely IS NOT exclusive to the Template itself. So why is there so little flexibility with how we organize TVs?

                How we want it to work:

                1. Ideally, we would be given the ability to define Custom Post Types for a Template, which could then give us more options on how to show TV's for that template, among other benefits. Each resource could then be assigned a Template/CPT (e.g. BaseTemplate/Gallery, BaseTemplate/Team, BaseTemplate/Article, etc.) Each fork in the Template itself would need to be handled with some kind of a conditional (e.g. [[*cpt:Gallery=`my content here`]]). Indeed, we can do this very thing with, you guessed it, a TV! But that doesn’t solve the issue at hand.
                2. Less ideally but still better, Form Customization rule-sets with constraints override those without constraints, or else constraints can be given a priority number - something that makes constraints actually useful.
                3. A way perhaps to use a Property Set as a system to set multiple constraints or otherwise control TV visibility.

                Anyway, that's my 2¢ on the subject. Is any of this something we might see added to Revo one day, or is this just a “deal with it until MODNext” scenario?
                • Dansig,

                  yes exactly what I was looking for. Unfortunately doesn't seem like this ever got resolved.

                  So here's what i did.

                  Whatever variables you want to add/remove, create them as a chunk or chunks.

                  Then create a tv that calls that chunk. Set the default value in input options to the name of the chunk, and then choose allow blank for input options.

                  Then when you go into the resource if you don't want it on that resource just delete the value in the tv field.

                  Works for me. Allows me to turn off or on the TV's for each resource while still using the same template.

                  Of course you do have to set it for each resource as you go, but you might probably configure Batcher or something to do bulk editing.
                    Content Creator and Copywriter