Ditto Modx for Dummies News, Articles

    I myself am a teapot and on the Internet I have not found a single intelligible article on this topic, where everything is explained step by step and as a result it works. After a long torment, I made myself and others an equally clear guide.

    1. Create a new resource, call it “News”, go to the Page Settings tab and uncheck “Cached” (this is necessary for the page switch to work)

    2. All child documents of this resource will be our news. In the Title field, enter the title of the news, in the Summary field, enter the abbreviated news, in the largest window enter the full text of the news. Be sure to checkmark Publish. To create a child document, right-click on the document "News" and select "Child Doc."

    3. Create a chunk, for example, “tpl_news” which will contain the html-template for the output of the article.
    image

    Here is more details about all placeholders

    4. To create a page for displaying all the news in the largest window of the News resource (or create a new resource and execute point 1), call CACHED Ditto
    & summarize = `5` - set the number of news on the page
    & paginate = 1 - enable pagination mode, thereby turn off the archive
    & tpl = `tpl_news` - ​​we refer to the article output template we created earlier. Parameters of Ditto 5. To create a block of several news on the main page, call Ditto in the right place

    [[Ditto? &startID=`11, 15` &summarize=`10` &tpl=`tpl_news` &paginate=`1`]]

    Стр.: [+pages+]




    [[Ditto? startID=`11, 15` summarize=`2` tpl=`tpl_news`]]

    Also popular now: