We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28121
    • 107 Posts
    When I build a site in Revo, I tend to have 2 just templates.

    1 A homepage template (lots of TVs and lots of work)
    2 An ’innerpage’ template for all other pages (usually just 1 TV)

    Because the homepage often has a lot of different areas that
    need updating by the client, I used to chop these up into Template
    Variables.

    Mostly they were simply rich text areas but what I’ve found is that

    1. It takes a while to TV up the homepage and make sure the TV names
    in Dreamweaver match the TV names in ModX.
    2. When A client wants a new TV area on the homepage, I quickly end
    up with a lot of TVs and am not even sure which ones are still used etc

    New Solution
    Instead of creating lots of TVs, I now create a folder and create a resource
    for what would have been a TV.
    By using the GetResourceField snippet, I can pull content from Resource Field
    into each template area. Clients just need to know that a Folder called
    Home Feeds contains the resources they need to update the homepage
    IE
    HomeNews
    Home intro text
    Home image
    Home Services list
    Home Services intro text
    etc etc etc

    So what I was wondering was if I am saving time but doing something that might
    be considered bad practice or even break during future Revo upgrades?


      • 3749
      • 24,544 Posts
      It’s odd, but I don’t think it will break in future versions and if the page load times are OK and your site won’t grow too big over time, it may work for you, especially if you’re just using it for the home page. Resources carry quite a lot of overhead that you don’t need (pub_date, unpub_date, publishedby, editedby, deletedby, etc., etc.) and it seems kind of funky from an MVC standpoint.

      Normally, that kind of stuff would go in chunks, but I don’t think rich text is available there at this point (I could be wrong). One option would be to use chunks and have the users edit them with the "It’s All Text" Firefox addon, which lets you use any editor (I think DreamWeaver would work).

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I’ve done this with Evo sites so the user can easily use QM on the front-end to edit such common blocks as the footer. Using resource/Ditto pairs with the inline editing capability of QM, I’ve cut way down on the contacts from clients wanting to change their phone number or address in the footer!

          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
          • 29597 ☆ A M B ☆
          • 350 Posts
          I actually really like to use TV’s...
          As long as you use a nice category structure all looks very manageable:
            MODX Ambassador (NL) | Responsive web design specialist, developer & speaker
            DESIGNfromWITHIN, MPThemes and Any Screen Size
            Follow me on Twitter | Read my blog | My code on GitHub
            • 3749
            • 24,544 Posts
            Quote from: sottwell at May 04, 2011, 01:37 AM

            I’ve done this with Evo sites so the user can easily use QM on the front-end to edit such common blocks as the footer. Using resource/Ditto pairs with the inline editing capability of QM, I’ve cut way down on the contacts from clients wanting to change their phone number or address in the footer!
            I think this could be done in Revo with NewsPublisher and multiple NpEditThisButton tags, but I haven’t tried it.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I think the bottom line here is that there really isn’t much that is a "bad" practice as far as templating goes. About the only bad practice you can get involved with is poor coding security habits. Anything else, if it works, it’s just the MODx way.
                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