We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10378
    • 375 Posts
    Quote from: sottwell at May 10, 2013, 05:28 AM
    That would be in your lexicon; the default is found in core/lexicon/<lang>/resource.inc.php

    http://rtfm.modx.com/display/revolution20/Creating+a+Resource+Class
    public function getContextMenuText() {
      $this->xpdo->lexicon->load('copyrightedresource:default');
      return array(
        'text_create' => $this->xpdo->lexicon('copyrightedresource'),
        'text_create_here' => $this->xpdo->lexicon('copyrightedresource_create_here'),
      );
    }
    </lang>

    This would only set the lexicon strings for the custom tree context menu.
      Freelancer @bitego http://www.bitego.com
      ---
      GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
      More infos here: http://www.bitego.com/extras/goodnews/
    • Yes, that's just the example provided by the documentation. You'll have your own lexicon files associated with your namespace.
        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
        • 10378
        • 375 Posts
        Quote from: Everettg_99 at May 10, 2013, 05:08 AM
        Anyone know how I can customize the "New Document" text that appears when I'm creating a new blog entry or new (insert CRC here)?

        http://www.screencast.com/t/5ahzh3AR72C

        Did you create a full custom resource type or do you try to modify an existing one?
        If you only want to modify an existing one, you could simply change the corresponding lexicon entry (I think that's what Susan suggested).

        If you created your own custom resource type you could override the getPageHeader method in the create.js (ExtJS) file:

            ,getPageHeader: function(config) {
                config = config || {record:{}};
                return {
                    html: '<h2>'+_('yourcrc.container_new')+'</h2>'
                    ,id: 'modx-resource-header'
                    ,cls: 'modx-page-header'
                    ,border: false
                    ,forceLayout: true
                    ,anchor: '100%'
                };
            }
        


        and for the update page in update.js:

            ,getPageHeader: function(config) {
                config = config || {record:{}};
                return {
                    html: '<h2>'+_('yourcrc.container_update')+'</h2>'
                    ,id: 'modx-resource-header'
                    ,cls: 'modx-page-header'
                    ,border: false
                    ,forceLayout: true
                    ,anchor: '100%'
                };
            }
        

          Freelancer @bitego http://www.bitego.com
          ---
          GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
          More infos here: http://www.bitego.com/extras/goodnews/