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

    I’m building a rental site that has 2 sections, one for summer and one for winter.
    The structure of the pages in each section is the same (home, description, price, ...).
    While some pages have a different content in summer and in winter, e.g. price, some other pages have exactly the same content during for both seasons (only the layout around it is changing).

    My question is the following. Each resource has a Content, which is editable. How can I replace the Content of resource B to be a copy of the Content of resource A?
    The goal is that when someone edits the Content of page A he/she doesn’t have to redo it for the page B.
    Is it something to do with @binding? Though it’s only the [content] part of the document I need, not the whole document.

    I’m afraid to be looking at the wrong way of solving it, so I would appreciate some pointers.

    Thanks
      • 15175
      • 116 Posts
      The getField snippet should do the job.

      http://modxcms.com/extras/package/?package=173
        • 3749
        • 24,544 Posts
        You might consider having a summer and winter chunk for each piece of content. A snippet called in your template could easily do the season calculation and insert the correct chunk. If you name your chunks some transformation of the pagetitle or ID (or some other variable), it could all be automatic.
          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
          • 15029
          • 35 Posts
          I’m already using different chunks based on conditions and it works well.
          This getField is going to complement it perfectly.

          Thanks for your help.