We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14772
    • 14 Posts
    I am not sure exactly how to word this question, but... is there a way where I can include content on a page without including in the template.

    For instance: on each page I have a template with certain chunks, and snippets assigned within. This way when I apply the template to the page all of this content is in the page. However, is there a way to add a certain chunk or snippet to a page without adding it to the main site template??

    I tried adding particular chunk inside the [*content*] area but it did not work. huh
      • 4041
      • 788 Posts
      In this case, I think your best option would be to read up on TV’s ( Template Variable ).

      http://modxcms.com/template-variables.html

        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 14772
        • 14 Posts
        Ok i read about TV’s but it is still confusing... it seems I can add default thing like url insertions and textareas using TV’s. However, i did not see or understand how to add custom snippets or chunks to the main section of a page during the edit process?

        could you shed some light on this issue for me?

        thanks!
          • 25883
          • 128 Posts
          Hey josh22x,


          Basically you just type the correct "piece" anywhere you want in the document’s content area.

          Like...


          Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

          {{Chunk}}

          Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

          [*TemplateVariable*]

          Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?


          [!snippet!]

          Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?



          It’s the easiest thing in the world, really.  So simple that I think we all forgot to explain it in the docs.  smiley


          Watch your syntax, spelling and capitalization! That’s what I always screw up on.


          I try to keep a list on paper of all the chunks & TV’s spelled correctly... but I somehow usually loose track anyway and have to do a lot of clicking back and forth to remember how I named them.


          John
            • 14772
            • 14 Posts
            Ok, yes! - that works Thanks!