We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17952
    • 2 Posts
    My suggestion:
    create a content variable like [*content(x)*] where x is the number of a page.

    Advantage:
    Header -footer-sidebar can be edited more easily by clients if its a page rather than a chunk.
    Also they are easily refereciated if different on different pages.

    Is that reasonable? shocked
      • 25663 MODX Staff
      • 12,272 Posts
      What advantage would this have over Template Variables?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 17952
        • 2 Posts
        Quote from: rthrash at Jun 17, 2009, 08:02 AM

        What advantage would this have over Template Variables?

        The idea is to make for instance a Header or Sidebar a page instead of a chunk.

        The goal is that it should be more easily understood by an editor not caring about chunks-variables etc.
          • 16183
          • 1,390 Posts
          Hmmm....I still don’t see any advantage of doing this. The [*content*] is basically a TV itself. So, if you want a header or sidebar, just create other TVs for them...they will all appear when you edit the page. And, if those header and sidebar TVs are of rich text editor type, the editor will not be able to differentiate them from the [*content*] except for the description you provide for the TVs.

          The thing with modx is flexibility...if you want you sidebar to be another page, that’s fine...you can use a snippet like GetField to pull in the contents of a another page into your sidebar/header. If you want sidbar/header in a chunk, fine, if you want your sidebar in a TV, that’s also fine, if you want to include the contents of an external file as your sidebar, that’s also fine.....I could go on and on...

          Think of it this way: if the content will not be changing and will be same across the pages - throw them in a chunk. The advantage is edit once deploy many times. If on the other hand the content of say your sidebar will be changing based on the page, put them in a TV (or pull them from another page if you wish). Heck,  you can even have TV-based chunks in modx. laugh

          cheers/k