We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33968
    • 863 Posts
    I’ve created several CMPs needed to update various tables for a custom package. They share a single namespace but with different actions.

    When drawing lexicons from a single default.inc.php it works across all CMPs and within the manager menus and actions. That’s fine. But if I split it across three smaller ’topic’ lexicon files the modx manager does not seem to recognise them, specifically in the Actions settings page.

    Renaming [tt]default.inc.php[/tt] to [tt]test.inc.php[/tt] and in my code and in the manager has the same result - not recognised.

    However if I go into System > Lexicon Management I can see all lexicon topic files as well as the default.

    Does MODx require and expect a ’default.inc.php’ file?
    Or is this a problem with my setup or possibly a bug?
      • 28215
      • 4,149 Posts
      MODX automatically includes the ’default’ topic for your CMPs. If you want to include other topics, you need to run:

      $modx->lexicon->load('namespace:topic');


      ie, to load ’comments’ topic for the quip namespace:

      $modx->lexicon->load('quip:comments');
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 33968
        • 863 Posts
        Thanks for the quick response Shaun but I haven’t had any luck with that so far...

        Does my CMP code in any way affect the Top Menu heading and descriptions within the manager? I’m setting my lexicon file via the Actions page (Action > Language Topics) but can’t get it to work with any lexicon file other than ’default.inc.php’. I’ve manually cleared the cache for each attempt before refreshing the manager.
          • 28215
          • 4,149 Posts
          You can only load the strings for the text for the Top Menu item’s text from the default Topic for a Namespace.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 33968
            • 863 Posts
            Ah, that would be it then... I suppose that makes sense too.

            Thanks Shaun!