We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28626
    • 87 Posts
    I’m using the example here as a base for my subscription form http://svn.modxcms.com/docs/display/ADDON/Register.Example+Form+1

      
    <label for="username">[[%register.username]]   
      <span class="error">[[+error.username]]</span>   
    </label>   
    


    Now when I display the page, the [[%register.username]] is show on the page as register.username instead of Username, while the error messages display ok.


    Any ideas?
      • 3749
      • 24,544 Posts
      The full version of a Revolution language tag is:

      [[%LanguageStringKey? &namespace=`NameSpaceName` &topic=`TopicName`]].


      If you leave out the parameters and just use [[%LanguageStringKey]], the default namespace (core) and the default topic (default) will be used. So if the string you’re looking for isn’t in that namespace and topic, it could be your problem.

      Try this:

      [[%login.username? &namespace=`login` &topic=`default`]].



        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
        • 28626
        • 87 Posts
        Ok I understand it better now.

        I’m still confused why in the docs [[%register.username]] is used while it should be [[%login.username? &namespace=`login` &topic=`register`]] when you use the login module.

        I also don’t understand how the [[+error.username]] does seem to work while I can’t seemed to find any topic named error in any namespace or is this some kind of general error string located elsewhere?

        Anyway thank you very much for your quick replies I’m working against a deadline and I’m new to modx so your help is really appreciated.
          • 3749
          • 24,544 Posts
          Can you give me the URL of the documentation where you saw this?

          AFAIK, there is no register.username language string, only login.username.

          Try just using [[%login.username]] and let me know if it works. The snippet may load the appropriate topic for you.

          The reason that [[+error.username]] works is that it is a placeholder set in the snippet, not a language string.

            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
            • 28626
            • 87 Posts
            I saw this here. http://svn.modxcms.com/docs/display/ADDON/Register.Example+Form+1

            And when I check the Lexicon Management indeed there is no register.username to be found, yet using [[%register.username? &namespace=`login` &topic=`register`]] seems to get translated just fine.

            I wonder how this is possible? It seems it takes it’s value from login.username instead as that is the only string I translated that I can find.
              • 3749
              • 24,544 Posts
              Quote from: stofke72 at Jul 30, 2010, 03:28 AM

              I saw this here. http://svn.modxcms.com/docs/display/ADDON/Register.Example+Form+1

              And when I check the Lexicon Management indeed there is no register.username to be found, yet using [[%register.username? &namespace=`login` &topic=`register`]] seems to get translated just fine.

              I wonder how this is possible? It seems it takes it’s value from login.username instead as that is the only string I translated that I can find.

              I see that the login namespace has a "register" topic as well as a "default" one. I didn’t notice that before.

              I went to correct the example, but Shaun has beat me to it. smiley
                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