We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7690
    • 166 Posts
    I have a news section on the right side of my site.
    But how does it work.

    i have:
    <div id="comments">

    [!NewsListing? &startID=`2` &tpl=`sidebar-news` &summarize=`3` &showarch=`0`!]

    </div>

    but how do i post news items in it?
    Do i have to start a new document? and put some code in it?
    i just dont get it.

    please help.
    I have already searched for a tutorial for this, but coudnt find a good one.
    • You have to have documents inside folder ID 2. Create them from teh manager or with the NewsPublisher snippet.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 7690
        • 166 Posts
        folder ID is menu index right?
        • No. The folder/document that stores the items to be listed in your example above is ID 2.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 7690
            • 166 Posts
            but how do you change the folder to ID 2 than? i dont see it anywhere... huh
            • The ID of the document/folder is right beside the document’s name in the document tree (the panel on the far left of the Manager page). You can’t change the ID of a document, this is generated automatically by the database when a document is created.

              To create documents under (or in, depending on how you want to look at it) another document, whether or not the "parent" is already a folder, simply right-click on the document that you want to be the "parent" and then choose "Create document here". Your new document will now be "under" its parent in the Tree, and the "parent" will automatically be changed to a folder if it wasn’t already.

              You can move an existing document to any document you wish to make its parent in a number of ways; one way is to right-click on the document that you want to move, then select "Move document". A dialog will pop up telling you to click on the document in the Tree that you want to be the "parent". That’s all. I think you are expecting it to be a lot more complicated than it is!

              All that is happening is that the document’s "parent" field in the database is set to the ID of the document you chose to be its parent. And a document becomes a folder if the "isfolder" field gets set to 1 (which the scripts take care of automatically). Otherwise it is still a document like any other document.
                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