We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17895
    • 209 Posts
    Quote from: Kleist at Jan 24, 2008, 04:16 PM

    Are you calling the snippet uncached? (You should)

    [!ManagerLogin!] = uncached
    [[ManagerLogin]] = cached

    Yea! thanks, that’s it... anyway, the author should write this in the resource page... actually in that page there is an example and the example is with the cached call !!
      Daniele "MadMage" Calisi
    • Most of us develop on uncached pages, so caching doesn’t become an issue while developing. Then sometimes we forget about that...
        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
        • 8894
        • 114 Posts
        Hello all,

        I modified this snippet to add template and language parameters.
        Do you find this useful enough to be added to repository ?

        Instructions:

        • unzip all into a "managerlogin" directory into the "assets/snippets" directory
        • create a snippet and copy the contents of the file named "managerlogin.snippet.php"

        Parameters (all optional):

        • &language [string]
          String defining which language file to use for default templates and error messages.
          Defaults to ’en’ (english).
          ’fr’ (french) also is available
        • &loginTpl [string]
          Template to use when no user is logged within the manager.
          Can be either a chunk name or a document ID or directly HTML code.
          Defaults to the template used by ManagerLogin previous releases.
          For placeholders, see description into the snippet code.
        • &loggedTpl [string]
          Template to use when a user is logged within the manager.
          Can be either a chunk name or a document ID or directly HTML code.
          Defaults to the template used by ManagerLogin previous releases.
          For placeholders, see description into the snippet code.
        • &errorTpl [string]
          Template to use for each error message to display.
          Can be either a chunk name or a document ID or directly HTML code.
          Defaults to the template used by ManagerLogin previous releases.
          For placeholders, see description into the snippet code.
        • &cssStyle [string]
          CSS style to add within the document <head> tag.
          Can be either a filename or directly CSS code inside a <style> tag.
          No default value.
        Warning: When using directly HTML or CSS code for the parameters, it may not
        work because of MODx parser behaviour. For example, ’=’ is not supported.
        • Please add this to the repository as an addon/new version of the existing resource. Sounds like a great set of additions. Thanks for contributing!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 8894
            • 114 Posts
            So I just updated the repository.
              • 22770
              • 285 Posts
              On line 57 of templates.inc.php we have

              . '<a href="[~[*id*]~]&[+ml.action_name+]=[+ml.action_val+]">[+ml.logout_lbl+]</a>'


              Should the &amp; not be a question mark (?) Otherwise, it doesn’t seem to work.