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

    I was wondering if it is possible to change the descriptions used in the standard modx for the top boxes when creating a page. At the moment they say:

    Title
    Long title
    Description etc

    Does anyone know which file within modx I can alter so I can change these? I want to change the Long Title, for example, so that it says ’H1 title’ I also want to change the Description so it says ’meta description’ I am assuming that this must be possible if I can find the correct file within the modx files. I am using Modx 0.9.6.3, but have the same problem with the newer versions.

    I am surprised that this feature isn’t standard as MODX is so good at doing everything else! Any help would be greatfully receieved.
      • 4310
      • 2,310 Posts
      That’s exactly what the ManagerManager plug in does, ships as standard with newish versions of Evolution.
      See if you have a chunk named mm_demo_rules.
      Documentation is @ /assets/plugins/managermanager/docs/
      If you have an older version of MODx, either upgrade or download it as a plug in.
      • ManagerManager rules are what you want. For example,

        mm_renameField('introtext','Summary');
        mm_renameField('longtitle', 'H1 Title');


        This is done in the chunk named in the ManagerManager plugin’s configuration tab (MODx comes with a chunk named mm_demo_rules you can use for an example).

        I’m not real sure if this will work with 0.9.6.3

        The reason MODx doesn’t have any way to do this without a plugin using heavy-duty AJAX and JQuery to manipulate the pages in the browser is that the action pages are from the original Etomite code base, and are .php files with a mixture of HTML and <?php...?> tags.The forms are echo’d as each field is generated, so there is no object to modify as there is when working with the document parser and the $modx->documentObject object. That is one reason why Revo was made; it is such a major task to rework all the Manager action pages that it was just more practical to rewrite the whole thing and take care of all the shortcomings of the original with one stone, as it were. It’s been an itch since the beginning, wanting to have the manager pages generated by the parser in the same way front-end pages are. Then you could do anything you wanted to them!
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 3071
          • 99 Posts
          Hi, I’m really a bit of a novice and most of that went over my head! Which file can I try to edit and exactly where is this file??! You can talk to me like I am an idiot or use bullet points, I will not be offended at all!! Thanks!
          • Go to your Resources -> Manage Resources (or Elements -> Manage Elements, if it’s a 1.0 version of MODx) to the Plugins tab, and see if you have a plugin named "ManagerManager" installed. If you don’t, go here and download and install it.

            If it is installed, go to its Configuration tab and check the first field "Configuration Chunk". This will have the name of the chunk that holds the rules. This chunk can include php code. Versions of MODx that came with Manager Manager have a sample chunk named "mm_demo_rules"; you can either use this one or another one of your preference, just make sure the name is the same!

            In that chunk (and if you have to create one because you installed ManagerManager yourself) the rules are stored, one rule per line. This is the mm_demo_rules that comes with 1.0.4

            // PHP *is* allowed
            // $news_role and $news_tpl will not apply to demo content but are left as a demonstration of what can be done
            
            // For everyone
            mm_default('pub_date');
            mm_renameField('introtext','Summary');
            mm_changeFieldHelp('alias', 'The URL that will be used to reach this resource. Only numbers, letters and hyphens can be used');
            mm_widget_tags('documentTags',' '); // Give blog tag editing capabilities to the 'documentTags (3)' TV
            mm_widget_showimagetvs(); // Always give a preview of Image TVs
            // mm_widget_colors('color', '#666666'); // make a color selector widget for the 'colour' TV
            
            // For everyone except administrators
            mm_hideFields('link_attributes', '!1');
            mm_hideFields('loginName ', '!1');
            // mm_renameField('alias','URL alias','!1');
            
            // News editors role -- creating a variable makes it easier to manage if this changes in the future
            $news_role = '3';
            mm_hideFields('pagetitle,menutitle,link_attributes,template,menuindex,description,show_in_menu,which_editor,is_folder,is_richtext,log,searchable,cacheable,clear_cache', $news_role);
            mm_renameTab('settings', 'Publication settings', $news_role);    
            mm_synch_fields('pagetitle,menutitle,longtitle', $news_role);
            mm_renameField('longtitle','Headline', $news_role, '', 'This will be displayed at the top of each page');
            
            // News story template
            $news_tpl = '8';
            // mm_createTab('Categories','HrCats', '', $news_tpl, '', '600');
            // mm_moveFieldsToTab('updateImage1', 'general', '', $news_tpl);
            // mm_hideFields('menuindex,show_in_menu', '', $news_tpl);
            mm_changeFieldHelp('longtitle', 'The story\'s headline', '', $news_tpl);
            mm_changeFieldHelp('introtext', 'A short summary of the story', '', $news_tpl);
            mm_changeFieldHelp('parent', 'To move this story to a different folder: Click this icon to activate, then choose a new folder in the tree on the left.', '', $news_tpl);
            


              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 3071
              • 99 Posts
              Hi, I appreciate your help but I am rather a novice. I created a plugin called: ManagerManager and copied this EXACT code into it:

              //<?php
              /**
              * ManagerManager
              *
              * Customize the MODx Manager to offer bespoke admin functions for end users.
              *
              * @category plugin
              * @version 0.3.8
              * @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL)
              * @internal @properties &config_chunk=Configuration Chunk;text;mm_demo_rules; &remove_deprecated_tv_types_pref=Remove deprecated TV types;list;yes,no;yes &which_jquery=jQuery source;list;local (assets/js),remote (google code),manual url (specify below);local (assets/js) &js_src_type=jQuery URL override;text;
              * @internal @events OnDocFormRender,OnDocFormPrerender,OnPluginFormRender,OnTVFormRender
              * @internal @modx_category Manager and Admin
              * @internal @legacy_names Image TV Preview, Show Image TVs
              */

              // You can put your ManagerManager rules EITHER in a chunk OR in an external file - whichever suits your development style the best

              // To use an external file, put your rules in /assets/plugins/managermanager/mm_rules.inc.php
              // (you can rename default.mm_rules.inc.php and use it as an example)
              // The chunk SHOULD have php opening tags at the beginning and end

              // If you want to put your rules in a chunk (so you can edit them through the Manager),
              // create the chunk, and enter its name in the configuration tab.
              // The chunk should NOT have php tags at the beginning or end

              // ManagerManager requires jQuery 1.3+
              // The URL to the jQuery library. Choose from the configuration tab whether you want to use
              // a local copy (which defaults to the jQuery library distributed with ModX 1.0.1)
              // a remote copy (which defaults to the Google Code hosted version)
              // or specify a URL to a custom location.
              // Here we set some default values, because this is a convenient place to change them if we need to,
              // but you should configure your preference via the Configuration tab.
              $js_default_url_local = $modx->config[’site_url’]. ’/assets/js/jquery-1.3.2.min.js’;
              $js_default_url_remote = ’http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js’;

              // You don’t need to change anything else from here onwards
              //-------------------------------------------------------

              // Run the main code
              $asset_path = $modx->config[’base_path’] . ’assets/plugins/managermanager/mm.inc.php’;
              include($asset_path);



              I then created a chunk called: mm_demo_rules Then copied this EXACT code into it:

              // PHP *is* allowed
              // $news_role and $news_tpl will not apply to demo content but are left as a demonstration of what can be done

              // For everyone
              mm_default(’pub_date’);
              mm_renameField(’introtext’,’Summary’);
              mm_changeFieldHelp(’alias’, ’The URL that will be used to reach this resource. Only numbers, letters and hyphens can be used’);
              mm_widget_tags(’documentTags’,’ ’); // Give blog tag editing capabilities to the ’documentTags (3)’ TV
              mm_widget_showimagetvs(); // Always give a preview of Image TVs
              // mm_widget_colors(’color’, ’#666666’); // make a color selector widget for the ’colour’ TV

              // For everyone except administrators
              mm_hideFields(’link_attributes’, ’!1’);
              mm_hideFields(’loginName ’, ’!1’);
              // mm_renameField(’alias’,’URL alias’,’!1’);

              // News editors role -- creating a variable makes it easier to manage if this changes in the future
              $news_role = ’3’;
              mm_hideFields(’pagetitle,menutitle,link_attributes,template,menuindex,description,show_in_menu,which_editor,is_folder,is_richtext,log,searchable,cacheable,clear_cache’, $news_role);
              mm_renameTab(’settings’, ’Publication settings’, $news_role);
              mm_synch_fields(’pagetitle,menutitle,longtitle’, $news_role);
              mm_renameField(’longtitle’,’Headline’, $news_role, ’’, ’This will be displayed at the top of each page’);

              // News story template
              $news_tpl = ’8’;
              // mm_createTab(’Categories’,’HrCats’, ’’, $news_tpl, ’’, ’600’);
              // mm_moveFieldsToTab(’updateImage1’, ’general’, ’’, $news_tpl);
              // mm_hideFields(’menuindex,show_in_menu’, ’’, $news_tpl);
              mm_changeFieldHelp(’longtitle’, ’The story\’s headline’, ’’, $news_tpl);
              mm_changeFieldHelp(’introtext’, ’A short summary of the story’, ’’, $news_tpl);
              mm_changeFieldHelp(’parent’, ’To move this story to a different folder: Click this icon to activate, then choose a new folder in the tree on the left.’, ’’, $news_tpl);

              I then proceeded to change around the fileds to see if any of the titles changes but nothing. sad

              • Did you upload the files for ManagerManager into your assets/plugins folder?

                And you don’t need all those rules; those are just sample rules that come with the demo. What you want are a bunch of lines like this:

                mm_renameField('original-name','your-new-name');
                mm_renameField('original-name', 'your-new-name');

                One line to rename each of the fields you want renamed.

                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 3071
                  • 99 Posts
                  Well I got it working on the new modx!!! Thanks!!! Just can’t seem to sort it out on the older version..
                  • It may not work on the older version; there have been some minor changes to the core in each subsequent release.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 3071
                      • 99 Posts
                      Yeah you might be right there! I can’t seem to get it working, I really appreciate your help. I will persevere!