We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25132
    • 129 Posts
    I feel like I am having a mental block and the solution is probably staring me in the eyes!!

    I am doing up a site for a sailing club and there will a lot of event results pages. Each page will have a results table in it based on one of several formats. So that the client doesn’t have to create the tables each time from scratch, I want to give them templates that already have the blank tables in them. But how do I get this into the Content area of the template??

    The only solution I can think of at the moment is to not do it through a template but to create a number of unpublished ’dummy’ resources that I set up with a blank table in the editor and the client then needs to pick the relevant dummy resource, duplicate it and then move it into the correct location within the site. Seems a little messy though as I would prefer all new resources are generated right where they’re supposed to go and a template then determines the new page’s structure. But I can’t see how this can be done.

    Any suggestions? Thanks!
      • 26931
      • 2,314 Posts
      if you want to place the table right inside the content field /(rich text) you could enable the table-function for TinyMCE & insert it with TinyMCE’s template function (to get the right settings, columns & rows + asome prefilled values e.g.).

      there’s also this option for a TV: http://community.modx-cms.ru/blog/addons/1170.html
      ( similar approach to the Multi-Image TV: http://www.kunane.com/modx/multi-image-tv.html )
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If this were on Evo I would suggest using Jot. The client logs in, goes to the page, sees the form in whatever manner you configure it using Jot’s form tpl, then use its comment tpl to structure the output. In this case, each "comment" would be a set of
        <tr>
        <td>[+field1+]</td><td>[+field2+]</td> ... 
        </tr>
        

        tags. Since Jot can have a custom table with custom fields, it’s very flexible as to how it can be used. Its tpls can use phx conditionals since phx is built-in to Jot.

        I don’t know if Revo’s Quip is this flexible?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 25132
          • 129 Posts
          Thanks sharkbait and Susan! It’s Evo and I’ll have a look at those suggestions. Have never used Jot before so this might be a perfect occasion!