We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27517
    • 2 Posts
    I’m creating a site in ModX that’s going to be edited by very basic users. What I would like is for them to have some default content presented to them automatically when they create a new resource -- e.g., an unordered list, a table, a header, et cetera, so that they’ll have a starting point that’ll hopefully help them keep with the style of the site.

    Is it possible to install default resource content for users?
      • 3749
      • 24,544 Posts
      It would take a plugin, but a fairly simple one. What version of MODX?
        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
        • 15083
        • 697 Posts
        Quote from: BobRay at Apr 25, 2011, 10:14 PM

        It would take a plugin, but a fairly simple one. What version of MODX?

        It does?
        I would use a rich text TV with a default value along the lines of:
        [*mycontent*]
        Default:

        <ul>
        <li>First item</li>
        <li>Second item</li>
        </ul>
        
        <table...etc>


        The user could then just start hacking away, and save over the default TV content.
        Granted you would not be using the [*content*] placeholder...but for a non plugin related noobish solution it will work smiley
          • 3749
          • 24,544 Posts
          That would work too, but using a plugin to change the actual content field would make it easier to use a standard template for the page, search, and use getResources for show selected pages.

          With your method, you’d probably also want to customize the Create/Edit Resource panel.

          OTOH, I’ve been playing around and the plugin is not as easy as I thought. I forgot that $resource is not available for new documents, which would have made it dead easy. I’m sure there’s a way to alter the content field of new docs, but nothing I tried worked.
            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
            • 27517
            • 2 Posts
            Hm. I can see some of the merit of each suggestion, but as I’m brand new to ModX, I’ll have to do some major research on what you’re talking about. Any chance you’d be able to break it down further for a noobie?

            If it helps, I’m working with v1.0.4 on this particular site.
              • 3749
              • 24,544 Posts
              You could use the TV method described above and (optionally) hide the main content field with ManagerManager.

              If you create the TV as described in the post above and attach it to the template used by a resource, the TV will show up automatically when you edit the 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