We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28517
    • 2 Posts
    Hey guys! New to MODx, but loving every minute of it. I’m working on a client site and have a repeatable controller that I’m looking to place into my content pages. I’m not sure whether or not I should be making it into a module and came to you all to hopefully put some resolve to the mental spinning my head is doing over trying to figure this all out.

    Here is the content page. You’ll notice the expand/collapse containers in the main section. I need to way to templatize these so that the client can easily drop them into the page at his will.


    And here is a wireframe outline of the same thing


    I’m hoping this all is doable using MODx and that I can abstract as much of the upfront work as possible, hopefully into a module or snippit of some sort. Let me know what you think and thanks for your help as I venture into the world of modding my MODx! grin

    Steve
      • 21257 MODX Staff
      • 730 Posts
      I don’t think a module is needed. I would build this by adding child documents to your content page. All you would need your client to manage is the title and the rich text content of the child docs. Then use Ditto on your content page (I would put the Ditto call in your template, after the [*content*]) to basically "list" the child documents. You would need to build custom Ditto templates, and you’d be off to the races.
      I don’t mean to make it sound like this would take 10 minutes. Conceptually simple.. then the slicker you want this (both on the public side and for your client’s ease of use), the more time it would take.

        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 28517
        • 2 Posts
        No, it’s fine. I typically spend 95% of my time thinking about the coding and only 5% of the time actually doing it. Want to make sure I’m heading down the right path. I’ll give this a whirl and let you know how it goes. Thanks for the suggestion!