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

    Until now, I’ve been displaying the content of short child documents over their parent page, using Ditto.

    Currently, I would like to list the tile of child documents in a menu like this one,
    http://www.cssplay.co.uk/menus/menufourteen.html,
    and display the content each child document when the mouse is over its title in the menu.

    I assume that the way to do this is building the menu with Wayfinder and have on the right some <div> or equivalent to receive the result of some Ajax request that pulls the appropriate child document.

    I had a small (successful) Ajax experience many months ago but never tried Ajax with MODx.

    I would like to hear your advice if using Ajax is appropriate for what I want to do.

    If yes, how can I do the MODx Ajax calls so that they return the content of the child documents ?

    I think that I will probably have to add some onmouseover event for Wayfinder’s rowTpl chunk, as CSSPlay’s example is a pure CSS menu that does not use Javascript.

    Thanks for any advice helping me finding a solution to this rather difficult problem.
      • 15001
      • 697 Posts
      Hi,

      I’ll try displaying the content of child documents by AJAXing their parent.
      I could find a tutorial about how doing this: http://modxcms.com/forums/index.php?topic=6743.0.

      Regards.
        • 15001
        • 697 Posts
        The tutorial that I told about in previous post answered my needs.

        In the links that make the Ajax calls, rel="template" must be set with the template name that will format Ajax’s output.
        Ex. rel="OnlyContent" if the template names "OnlyContent". This was not obvious.