We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    It seems redundant to have to attach a property set to an element *and* use @propertyset in the tag. I’m wondering if we could just use one or the other.

    I assume that there’s a speed and efficiency gain from the @ token, but I’m wondering if it’s worth the loss of convenience and the potential confusion created by having to do both to make the properties available.

    Also, would having a property tag be a reasonable alternative to @PropertySetName?

    [[@PropertyName]]
      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
      • 28215
      • 4,149 Posts
      Quote from: BobRay at Jul 24, 2009, 05:59 PM

      It seems redundant to have to attach a property set to an element *and* use @propertyset in the tag. I’m wondering if we could just use one or the other.

      I assume that there’s a speed and efficiency gain from the @ token, but I’m wondering if it’s worth the loss of convenience and the potential confusion created by having to do both to make the properties available.

      Also, would having a property tag be a reasonable alternative to @PropertySetName?

      [[@PropertyName]]

      The reason you have to attach the Set name is because multiple sets can be attached to an Element. You need to specify which set you would like to use. "Attaching" the Set to the Element just gives it access to that Set.

      And no; if I’m understanding you right, merging all the Sets variables is not an option; this would eliminate the value of Sets in the first place - variables with the same name would get overridden.

      With regards to your Property Tag; I’m not exactly sure what that would do. Please elaborate.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 3749
        • 24,544 Posts
        The @PropertyName tag would be to allow access to a property in an attached set without using @PropertySetName in the tag. I see now that it’s unworkable since there could be multiple attached property sets with duplicate properties.

        If there a way to specify multiple property sets in a tag? Ie.:

        [[ElementName@propset1@propset2]]
        or
        [[ElementName@propset,@propset2]]
          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
          • 25663 MODX Staff
          • 12,272 Posts
          In that case Bob, what would control overlapping properties (first or last listed)? I can see a case where that might be handy, but breaking down property sets into sub-property sets like "templates", "parameters", "filters", etc.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 3749
            • 24,544 Posts
            Quote from: rthrash at Jul 24, 2009, 06:29 PM

            In that case Bob, what would control overlapping properties (first or last listed)? I can see a case where that might be handy, but breaking down property sets into sub-property sets like "templates", "parameters", "filters", etc.

            I had envisioned that behavior with overlapping properties would be undefined. It would be up to the user to make sure there weren’t any.

            I don’t really have a need to specify multiple property sets, I just thought it might be there already and wanted confirmation one way or the other.
              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