We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23126
    • 8 Posts
    Hello world ! cool

    I try to add a TV, (or snippet) to display who is edited and created some document.

    I found one snippet but isnt work under Ditto.

    This is my structure:

    Template:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<title>[(site_name)] | [*pagetitle*]</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<link rel="stylesheet" href="[(base_url)]assets/templates/default/site.css" type="text/css" media="screen" />
            <base href="[(site_url)]" />
          </head>
    <body>
    <div id="content">
    [*title*]
    [*#content*]
    [[Ditto? &tpl=`tpl_main` &hidePrivate=`0` &display=`all`  &dateSource=`editedon` &sortDir=`ASC` &sortBy=`menutitle`]] 
    </div>
    </body>
    </html>


    Chunk "tpl_main"

    <br>----------------------------------------
    <br>[+#menutitle+][+#title+]<br>
    <br>
    [+#content+]<br>editedby 
    <div id="float">Last modif: [+date+]</div>[+editedby+]


    I want simply add.. Created by: xyz 01/01/1900 Modified by: abc 01/02/1900

    Somebody can help me huh
      • 11975
      • 2,542 Posts
      Hi,

      I’ve answered in the french forum but this could be useful to someone else so here is tha way to go

      [+editedby:userinfo=`username`+]

      See Phx documentation for details on userinfo modifier.

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l