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

    I have a really big problem with 2 ditto's in one template, first [!Ditto? displays "menu navigation list", the second [!Ditto? shows six contents per page (pagination).

    So, for example i have:

    (*) Main [id 1]
    |
    |____ (*) blog [id 4]
    | |
    | |____(*) news 1 [id 5]
    | |____(*) news 2 [id 6]
    | |____(*) news 3 [id 7]
    |
    |
    (*) About [id 2]
    |
    (*) Contact [id 3]

    All i want it's pagination:
    - 1 news
    - 2 news
    -3 news

    in blog [id 4] - one news / per page

    So i put in blog template:

    [!Ditto? &parents=`[*id*]` &display=`1` &orderBy=`menuindex DESC` &showInMenuOnly=`1` &tpl=`blog` &paginate=`1` &paginateAlwaysShowLinks=`0` &tplPaginatePrevious=`pag_prev` &tplPaginateNext=`pag_next`!]

    And of course i want to automatic display menu navigation ( Main, About and Contact ) in blog so i also add in "blog" template:

    [!Ditto? &parents=`[*parent*]` &orderBy=`menuindex ASC` &showInMenuOnly=`1` &tpl=`nav`!]

    And quess what ?

    First blog paginate page looks good, they display:

    - news 1
    - next link
    - and menu navigation: Main, About, Contact

    But if i click "next" pagination link they load: news 2 but navigation menu is: About, Contact
    if i click another "next" pagination link they load: news 3 but navigation menu is: Contact

    So my question is, why ditto cuts loaded data from different ditto by "display" option from other ditto ? o.0
    Can I use on one template two ditto's for showing main navigation and second for paginated blog content ?

    http://masterm.soulandmind.pl/aktualnosci-slowianska.html <-- this is real example, when u click next page link, they cut by -6 navigation menu links... it is a bug ?
      • 42399
      • 39 Posts
      Look at &id parameter.
        • 46526
        • 21 Posts
        Sorry but i dont know &id parameter can u give me a link to wiki.modx or something else ?
        Rly thx 4 help.
          • 42399
          • 39 Posts
            • 46526
            • 21 Posts
            Thx a lot, it works like a charm! smiley