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

    I'm working on a problem where pre-setting values would save me a ton of workarounds. So before I start hacking the newspublisher package with above patches (and breaking it when updating) I thought I'd ask how the changes are coming around?

    Also I noticed that &readonly doesn't seem to work on regular text-fields. I can change and save such fields just fine which is not what I expected.

    And in the field-templates (e.g. npTextTpl) I could not use output modifiers for the placeholders: I wanted to do something like:

    [[+npx.help:isnot=``:then=`<br>([[+npx.help]])`:else=``]]


    But this always returns the else-case, even if [[+npx.help]] is not empty. Why is that? I even tried a similar thing with the If-snippet, which gives the same results.

    Jörg
      • 3749
      • 24,544 Posts
      I'm afraid I still haven't had time to implement the presets.

      On your second question, I'm not sure why that wouldn't work. It might be a caching issue. You might try it like this:

      [[!+npx.help:isnot=``:then=`<br>([[+npx.help]])`:else=``]]
        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
        • 36491
        • 36 Posts
        Hi Bob, thanks for the info!

        I Implemented the solution suggested earlier for the pre-set fields which works quite well. So no worries in this aspect.

        Caching: This doesn't change the results. Really strange. Anyway, this a minor problem, so I'll leave it with that.

        Another thing that is a bit more annoying is that the dublicate button does not work here. While updating and deleting resources from newspublisher works fine, when I press duplicate I get the same address but the page is completely empty (not even the template is loaded). Any idea why?
          • 3749
          • 24,544 Posts
          I can't replicate this problem with duplicate. Are you sure the current user has resource_duplicate permission?

          Also, check the &parents property. It affects the opportunity to duplicate a resource.
            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
            • 3749
            • 24,544 Posts
            On the readonly option, are you sure you have this tag in the appropriate Tpl chunk (e.g., your textarea Tpl chunk)?


            [[+npx.readonly]]


            Be sure there is a space on each side of it.
              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