We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8872
    • 41 Posts
    I wonder how to do create a new resource (like news post) by just clicking a link in the menu? So that resource would default to folder ’news’ and use ’newsTpl’ as main template.

    Thanks!
      • 26016
      • 561 Posts
      Hi,
      The very quickest way I can think of would be this... first, in system settings set "newsTpl" to be the default template of your site.

      Then right-click on your "news" folder.... Create.... Create a Document Here.

      That’s pretty quick. If you don’t like "newsTpl" as your default template, it’s pretty easy to change that in your document while you’re creating it.

      Cheers
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 8872
        • 41 Posts
        Thank you for your answer. Unfortunately I need to make it very simple for my content editors. Also I have other 2 content types - blog and articles, so I can not change default type.

        I need - ideally - one-click solution. So link 1: create document in folder news with tplNews; link 2: document in folder articles with template tplArticles; etc.

        Any solution for this?
          • 3749
          • 24,544 Posts
          You might take a look at the NewsPublisher snippet. It allows users to create resources in the front end and you can preset the template and parent folder.
            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
            • 8872
            • 41 Posts
            Thanks Bob, I have tried and used that snippet for another site, really like it. But for this particular project I need to keep everything in the manager.

            I am sure there is a way - if you managed to do that in frontend smiley
              • 3749
              • 24,544 Posts
              I think Form Customization will do everything you need with respect to customizing the Create/Edit Resource form, although it will take quite a few rules.

              You can set the default value of the template and parent fields or hide them. You might be able to do both -- I’m not sure. You can hide any other fields as well.

              You can hide the File tree and Element tree by disabling the file_tree and element_tree permissions (disabling resource_tree will hide that tree as well). You can hide items in the Top Menu either by disabling permissions or by adding custom permissions for those items. You can restrict users to a particular part (or parts) of the Resource tree by creating a tree_root_id user setting.

                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
                • 8872
                • 41 Posts
                Thanks again! I need to dig deep into the manual, time to go beyond basics smiley

                Also found interesting approach here (Evo), wonder if possible with Revo:
                http://www.kunane.com/modx/managing-resources-via-module.html
                  • 4172
                  • 5,888 Posts
                  its possible to create CMP (custom-manager-page) which does what you need.

                  This can be a simple form or a full-featured extjs-app.

                  may be its even better to create two custom-tables for news and articles and two CMPs to manage them
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 8872
                    • 41 Posts
                    Thanks Bruno. Can you suggest starting point to learn all these things? I am reading the manual at the moment - really excited about everything related to MODx, but obviously need to take one step at the time.