We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23126
    • 8 Posts
    Hi everybody.. i’m new here. tongue

    I try the way to make a template very basic.. no menu.. just display a parent document and all child of this document.

    Somebody had one ? or help me to create one ?? undecided


    Thank’s grin
      • 34017
      • 898 Posts
      Peter,

      You’ll use Ditto to do this. http://wiki.modxcms.com/index.php/Category:Beginners
      Use the tutorial ’How to Create a Blog’. To show the parent also, just post the Ditto call below the parent content.
        Chuck the Trukk
        ProWebscape.com :: Nashville-WebDesign.com
        - - - - - - - -
        What are TV's? Here's some info below.
        http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
        http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
        • 23126
        • 8 Posts
        I dont want to create a blog..
        i need just to create a basic template look like this

        PARENT DOCUMENT TITLE (1)
        PARENT DOCUMENT CONTENT
        CHILD DOCUMENT TITLE (2)
        CHILD DOCUMENT CONTENT(2)
        CHILD DOCUMENT TITLE (3)
        CHILD DOCUMENT CONTENT(3)
        CHILD DOCUMENT TITLE (4)
        CHILD DOCUMENT CONTENT(4)

        ETC...

        No background or anything else.. just white background and text as per WYSIWYG formated.. thats all.



          • 34017
          • 898 Posts
          Following that Tutorial will do what you want. I mis-labeled it as how to create a blog. But if you follow that tutorial, youll get what you want.
            Chuck the Trukk
            ProWebscape.com :: Nashville-WebDesign.com
            - - - - - - - -
            What are TV's? Here's some info below.
            http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
            http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
            • 23126
            • 8 Posts
            Ok..

            IF we save "Access permissions" under "All Document Groups (Public)" and we click "Preview Document" ... Everything is perfect

            B..U..T..

            When i change "Access permissions" of one child document, under another document group ex.: "testdocument" and i click "Preview Document" we see only "All Document Groups (Public)" (child document doesnt display)

            I created another user, linked to the "testdocument", and we can edit any document under this group, but cannot see document under preview document..

            and, if we set all document (parent & child) under "testdocument" we obtain this error:

            ERROR: Too many forward attempts!
            The request could not be completed due to too many unsuccessful forward attempts.

            My config :

            shrunk name: tpl_main
            [+title+]<br>
             <p>[+content+]</p><br>



            My template: def_temp
            <!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>
            [[Ditto? parents=`1` &tpl=`tpl_main` hidePrivate=`0`]]
            </body>
            </html>


            Maybe i forgot a param inside Ditto huh

            Could you help me ?
              • 34017
              • 898 Posts
              Well one thing. I think you may want to replace the Ditto call in your template with [*content*]. And place the Ditto call in your document number 1 (This way you can also show content from doc 1).

              There is a lot of Ditto parameters here: http://www.modxcms.com/ditto_parameters.html

              You said Preview Document isnt working. Is the page working though (at the frontend)?
                Chuck the Trukk
                ProWebscape.com :: Nashville-WebDesign.com
                - - - - - - - -
                What are TV's? Here's some info below.
                http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
                • 23126
                • 8 Posts
                Same problem..

                system always show document with permisssion: All Document Groups (Public)
                but if we change a permission on one of the child for "testdocument" (ex) this document they dont appear..


                ... i think this problem due to "Private" (in page data)

                Status
                Status: Published
                Publish date: (Not set)
                Un-publish date: (Not set)
                Cacheable: Yes
                Searchable: Yes
                Menu index: 3
                Show in menu: Yes
                Web access: Private
                Manager access: Private

                Do you know to change Private, for a specific "Document Groups" huh

                  • 7231
                  • 4,205 Posts
                  system always show document with permisssion: All Document Groups (Public)
                  but if we change a permission on one of the child for "testdocument" (ex) this document they dont appear..
                  If you are trying to include private documents in your Ditto output you need to use the hidePrivate parameter (by default it is on, set it to 0 to turn it off:

                  http://ditto.modxcms.com/files/snippet-ditto-php.html#hidePrivate

                  Once you click on the link to go to the private page if not logged in it will direct you to the Unauthorized page you determine in the site settings (in the manager). I think if no page is set it will go to the error page, not sure though.

                  However if you are trying to get a level aware output Wayfinder will be better than Ditto (Ditto returns a flat structure while Wayfinder returns a level- parent + child - structure). In wayfinder you would use the ignoreHidden=`TRUE` parameter to include the private documents.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don&#39;t know what it is.
                    Do you, Mr. Jones? - [bob dylan]