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

    I’ve recently discovered MODx and I’m trying to setup a new site. I’ve tried the template variables but I don’t know if they are the right choice. I’ve made a custom designed contentbox (based on the certain HTML tags and CSS markup) for the sidebar. The editor should be able to add a various number of boxes with various content while keeping my HTML markup. Basically I want an "Add a box to the sidebar"-feature wink which might be repeated numerous times.

    I’ve learned how to deal with predefined boxes (for instance: include "Search", "Recent posts" on this page, exclude "Search" on that page - based on TV’s) and that’s fine - however the boxes I need would be unique for each page. An editor might add a "Read more about topic xyz"-box on one page and a "Please contact dr. J. Doe"-box for other pages.

    Does it make sense? - and how can it be done?

    Best regards,

    Jax
      • 25663 MODX Staff
      • 12,272 Posts
      You could create a TV containing a multi-select list, and define all your options as chunks for the values of the list options. Cool idea!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 14111
        • 2 Posts
        Hi Ryan,

        Your solution will only work if the editor possess some basic HTML skills. My question is targeted a specific need however a general non HTML experience would be preferred.

        My markup looks like this:
        <dl class="box">
        <dt>Header</dt>
        <dd>Content</dd>
        </dl>


        I’m looking for a way to give the editor an opportunity to add a random amount of boxes while he’s only permitted to edit the "Header" and "Content" part of the chunk.

        Is it possible to make a kind of template chunk where the editor’s options is limited to some specific fields - while giving him the option to add yet another chunk?

        Best regards,
        Jax