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

    I'm currently in the process of converting a static site using modx and have a question regarding templates.

    Currently, I'm pasting all of my markup AND content into the template, I then use TAGS and variables to create editable regions.

    Should my templates consist ONLY of markup and TAGS /variables? Should all content be removed from the template. Is it OK to create a template that holds some content (text images etc)?

    Furthermore is it OK to paste markup in the content box when creating a new resource / page?

    Many thanks for your help,
      • 42562
      • 1,145 Posts
      donshakespeare Reply #2, 11 years ago
      Currently, I'm pasting all of my markup AND content into the template, I then use TAGS and variables to create editable regions.
      This is good, what you are doing already.

      It is okay to paste markup in the content area.

      What you are asking is design concept. You will see what best works for you when you are using your site more and more.

      The template, as the name suggests should hold common items, items that will not be repeated.
      This makes your life easier.
      If you want to bake twenty cupcakes, you don't waste your time moulding them individually.
      Get a template to do the cakes, shape-wise.
      Any cakes with special design, will have to be done individually.
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 50574
        • 70 Posts
        A great resource I found when starting out with ModX is this series of videos from Jesse Showalter.
        https://www.youtube.com/watch?v=QeWcpYlX5Bg

        He does exactly what you're trying to do and talks you through taking a static site and making it into an editable ModX site.
          • 3749
          • 24,544 Posts
          This is a little outdated, but may help you: http://bobsguides.com/porting-your-site-to-modx.html.
            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