We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7155
    • 160 Posts
    I have a website home page template. The header, footer, menu and menu are reused as chunks. The side bar makes use of ditto to get summaries etc. I used wayfinder for the menu (powerful)

    So far I think I used Modx well

    Now I am faced with having to decide how to preserve my styles at the same time allowing the client to be able to change some of the content. I have particularly styled header elements (h1,h2...) and as well as list items with images etc.

    What is the best approach to give the client control to edit the text yet maintain the style?

    One other strange thing is that I havent found use for the [*content*]
      • 16183
      • 1,390 Posts
      Quote from: designetic at Jun 23, 2009, 01:09 PM

      One other strange thing is that I havent found use for the [*content*]

      That’s possible. Where’s your content then for those docs ditto’s displaying? in some TVs/Chunks/Summary field?

      cheers/k
        • 7231
        • 4,205 Posts
        What is the best approach to give the client control to edit the text yet maintain the style?
        You can limit the tags that the editor can use via the RTE (TinyMCE). I think that there is a filed either in the plugin config or in the site config panel to manage the tags available to the RTE. Then you can use a custom style for the RTE to display te styles the same as on the site.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 24935
          • 160 Posts
          I’m guessing here, but it sounds like you have been creating separate templates for actual pages, and putting the content into the templates. The normal approach is to create a separate template for each unique layout.

          You would put [*content*] in the spot where you want the client to have a block of editable text--this is where the text of the page would go. Whatever styles you have in your css stylesheet will also be applied to this content, so it should have a consistent appearance with the rest of the site if you did a good job on your stylesheet.
            • 7155
            • 160 Posts
            Quote from: dev_cw at Jun 23, 2009, 04:45 PM

            What is the best approach to give the client control to edit the text yet maintain the style?
            You can limit the tags that the editor can use via the RTE (TinyMCE). I think that there is a filed either in the plugin config or in the site config panel to manage the tags available to the RTE. Then you can use a custom style for the RTE to display te styles the same as on the site.
            thanks for the tip. will look for it
              • 7155
              • 160 Posts
              Quote from: rfoster at Jun 23, 2009, 04:46 PM

              I’m guessing here, but it sounds like you have been creating separate templates for actual pages, and putting the content into the templates. The normal approach is to create a separate template for each unique layout.

              You would put [*content*] in the spot where you want the client to have a block of editable text--this is where the text of the page would go. Whatever styles you have in your css stylesheet will also be applied to this content, so it should have a consistent appearance with the rest of the site if you did a good job on your stylesheet.
              it was different templates for different layouts as is normal. wink

              thanks for the clarity on [*content*]
                • 7155
                • 160 Posts
                Quote from: kongondo at Jun 23, 2009, 03:41 PM

                Quote from: designetic at Jun 23, 2009, 01:09 PM

                One other strange thing is that I havent found use for the [*content*]

                That’s possible. Where’s your content then for those docs ditto’s displaying? in some TVs/Chunks/Summary field?

                cheers/k
                yes, for this particular project, I had a template where I didnt feel the need to have editable content. I thought I had designed it wrongly for not having to have it.
                  • 3749
                  • 24,544 Posts
                  Normally, you put any content that you want to be editable by regular users in either the Content field or in template variables. Everything else goes in the template, CSS files, chunks, or snippets (and occasionally, plugins). The template is seldom edited once you have it the way you want it. That way, the content is completely separate from the styling and as long as your users just use the Create/Edit document screen, they can’t affect anything but the editable content.
                    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
                  • You can also hide TVs by assigning them to a document group that your editor users don’t have access to.
                      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