We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25315
    • 68 Posts
    Can a chunk be called from within the definition of a chunk ?

    If so, is this a good idea?

    Sorry if this is a basic question. I couldn’t find an answer for this by googling or searching the forums.

      • 20413
      • 2,877 Posts
      Yes! You can nest chunk in chunk, tv in tv and snippet call in snippet call. [!..[[..]]..!] or [[..[!..!]..]]
      It’s not a bad idea, if it’s for a good idea...
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 25315
        • 68 Posts
        Are there peformance considerations for including chunks within chunks ?


        I’m about to start playing with templating with modx, and I’ll be creating a template that uses Steve Hatcher’s sticky footer solution.
        http://www.cssstickyfooter.com/

        I figure one way to do this to "chunkify" an adaptation of Steve’s html wrapping code, and include my chunks within it.

        I’ll be doing this with consideration to James Ehly’s considerations, given here:
        http://www.devtrench.com/tutorials/modx/modx-templating-strategy/

        But before I start, I’d like to know if there are performance considerations for calling chunks within chunks? Or even for calling many chunks, the way that James does.

        Any advice for this noob is appreciated.

        Thanks
          • 20413
          • 2,877 Posts
          I would rather put the chunk in a TV or in the template than adding chunks inside chunks.
          The only thing i chunkify like this is static html like javascript or a header. Don’t call
          your [*content*] from a chunk but from inside the template.

          Other tham more job for the parser the caching wont be as effective or work.
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 36397
            • 3 Posts
            Hello fellows, post removed by me. [ed. note: imagikon last edited this post 15 years, 1 month ago.]
              • 36424
              • 10 Posts
              hi,

              the only thing we can answer for sure is that it's not "chunking" smiley
              this, for a simple reason but one that makes me salute MODx every day, MODx doesn't output anything but what you have written.

              Have you checked aaron menu runs with the moo release you're using ?

              have swing
                • 36397
                • 3 Posts
                Thank you "virtual". I just made it to work. Its all naming convention. I was having a problem with CSS positioning, then I simply put div aside nested chunk within "main" chunk and styled it with inline "style" to be absolute positioned. Then I checked names referred in "js" folder and found one of the js files was lower cased. But in reference it was upper case. So I changed it accordingly to upper case - it works. Now I'll need to see how to get out of "absolute" positioning bc if there any changes in text length in
                 [[$content]]
                - that menu will be repositioned.
                  • 36397
                  • 3 Posts
                  Now there another thing to learn: how to link my newly created PHP pages (resources) to these sliding images.
                  Is there any tutorial/trick/tip?
                  Thank you all,