We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23491 ☆ A M B ☆
    • 1,056 Posts
    I think it’s pretty cool that you can use Property Sets on Revo Templates!

    I am trying to determine if you can override an existing Template Property Set at run-time... Can this somehow be done similar to the way you can with [[Snippet@NewPropertySet]]?

    Testing Example: http://pastebin.com/A0Tb2b2a
      Mike Reid - www.pixelchutes.com
      MODx Ambassador / Contributor
      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
      ________________________________
      Where every pixel matters.
      • 28215
      • 4,149 Posts
      Not in 2.0, currently, since there’s no mechanism to attach property sets directly in the Resource. We definitely want to address this by 2.1.

      If you could file a feature request in http://bugs.modx.com/ so we don’t forget this.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 23491 ☆ A M B ☆
        • 1,056 Posts
        Quote from: splittingred at Aug 17, 2010, 02:21 PM

        Not in 2.0, currently, since there’s no mechanism to attach property sets directly in the Resource. We definitely want to address this by 2.1.

        If you could file a feature request in http://bugs.modx.com/ so we don’t forget this.

        Good to know!

        Here you go: http://bugs.modx.com/browse/MODX-2286
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
          • 23491 ☆ A M B ☆
          • 1,056 Posts
          While I am on the topic, do Template Property Sets currently support attaching Site Property Sets? I only ask because in my testing I have not been able to get this to work as I originally expected.

          For example, Create a Property called "test" assigned to your default Template (give it a value of "Hello").
          Then, create a Site Property Set (Tools > Property Sets > New Property Set) with the name of "template". Create a Property within the new set called "test" (only give it a value of "World")
          Next, edit your default template and click the "Add Property Set" button on the Properties tab and choose the site property set "template" that was just created. You should now see the "test" property in green with a value of "World". Click "Save Property Set".
          Finally, add the modx tag [[+test]] somewhere on your Template and click "Save"

          When I complete these steps and view my site I was expecting to see "World", however I am showing "Hello" from the default property set for the template...
            Mike Reid - www.pixelchutes.com
            MODx Ambassador / Contributor
            [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
            ________________________________
            Where every pixel matters.
            • 28215
            • 4,149 Posts
            Quote from: pixelchutes at Aug 17, 2010, 04:11 PM

            When I complete these steps and view my site I was expecting to see "World", however I am showing "Hello" from the default property set for the template...

            Right, you wont, since PropertySets only come into play when they are explicitly declared in a Tag. Since Templates don’t *have* tags, they never get a Property Set...

            This can be addressed (something I’d like to do) by allowing you to choose a Property Set when choosing a Template for a Resource. Currently, in 2.0, this isn’t supported. I’d like to get it in 2.1.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 36541
              • 222 Posts
              Quote from: pixelchutes at Aug 17, 2010, 04:11 PM

              While I am on the topic, do Template Property Sets currently support attaching Site Property Sets?

              What are Site Property Sets? Do you mean PS with no element attached? If so, once you do attach a PS to template doesn’t it loose its "Site" status?

              Quote from: splittingred at Aug 17, 2010, 04:16 PM

              This can be addressed (something I’d like to do) by allowing you to choose a Property Set when choosing a Template for a Resource. Currently, in 2.0, this isn’t supported. I’d like to get it in 2.1.

              Would resource fields be filled with values this way? This would allow to use pre-defined field value schemes for various "types" of resources (eg. alias, showmenu) while reducing number of templates. That would be very, very useful!

              However, form customization allows this already, although not all fields can be set this way (see list).

              The PS way would be much quicker and easier to manage, mainly because it operates on groups of properties rather than on single ones. Thus it would make sense to enable PS use in form customization too.

              I filed MODX-2293 request for it.
                This is the web: the only thing you know about who will come is that you don't know who will come.