We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39149
    • 21 Posts
    PROBLEM: My "Features" page uses Articles; I wish to access the introtext from these Features Articles on my home page. The code below produces nothing; the same applies if I remove the &tpl.

    I'm still fairly new to MODX, so it's probably a simple error, but I can't see it and have spent ages on it / trawling the web for solutions.

    Anyone able to offer help on this please? Much appreciated.

    Code as follows ...

    Home page:

    [[!getResources?
    &tpl=`MDCCArticleTemplate`
    &showHidden`1`
    &includeContent=`1`
    &includeTVs=`1`
    &processTVs=`1`
    &showUnpublished=`1`]]

    MDCCArticleTemplate:

    <b>FROM MDCCArticleTemplate: Content: [[*content]]</b>
    <b>FROM MDCCArticleTemplate: Introtext: [[*introtext]]</b> [ed. note: oolite247 last edited this post 13 years, 10 months ago.]
      • 39149
      • 21 Posts
      Home page code:

      [[!getResources?
      &tpl=`MDCCArticleTemplate`
      &showHidden`1`
      &includeContent=`1`
      &includeTVs=`1`
      &processTVs=`1`
      &showUnpublished=`1`]]
        • 39149
        • 21 Posts
        Aaargh - code not copying correctly. I'll type it out again this time ...

        Home page code:

        [[!getResources?
        &tpl=`MDCCArticleTemplate`
        &showHidden=`1`
        &includeContent=`1`
        &includeTVs=`1`
        &processTVs=`1`
        &showUnpublished=`1`]]

        MDCCArticleTemplate code:

        [[*content]]
        [[*introtext]]
          • 39149
          • 21 Posts
          Ok, this is not going well ...

          Can someone please tell me why every time I copy & paste OR simply type code into this forum, it vanishes when I post???

          Thanks.
            • 39149
            • 21 Posts
            Last try - bear with me - found the CODE button - can you tell I am a newbie here ... apologies.

            Home page code:

            [[!getResources?
              &tpl=`MDCCArticleTemplate`
              &showHidden`1`
              &includeContent=`1`
              &includeTVs=`1`
              &processTVs=`1`
              &showUnpublished=`1`]]


            MDCCArticleTemplate code:

            <b>FROM MDCCArticleTemplate: Content: [[*content]]</b>
            <b>FROM MDCCArticleTemplate: Introtext: [[*introtext]]</b>
              • 39149
              • 21 Posts
              [SOLVED]

              Added
              &parent=`25`
              to the getResources call.