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

    this is the structure of my website :

    Works
    first post
    second post
    third post

    Blog
    first post
    second post
    ...


    The documents "Works" and "blog" have [[*introtext]] : "Works is about blabla..", "This blog is about..."
    In the template of the posts I would like to place in the header the [[*introtext]] of the post’s parent.

    But I haven’t found the method in the documentation...

    any help would be appreciated
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Easy to accomplish using the getResourceField snippet. Fetch it through package manager and use it with the parameters displayed here: http://modxcms.com/forums/index.php?topic=52181.0

      While writing this reply I noticed this wasn’t mentioned in the RTFM, so I’ll quickly put up a draft on there too, so others may find it easier.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 11076
        • 159 Posts
        Another way i can think of (in case you don’t comfortable with running a snippet especially for this)
        you can use a TV (name it sumytxt or something) and fill it with the default setting of @INHERIT, assign it to your template, and than simply use it as [[*sumytxt]].

        i prefer getResources but i’m just sharing another option for you (if you use the same template and want to avoid a snippet call)
          Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
          • 31876
          • 33 Posts
          Nice, really easy (now laugh) Thanks a lot!

          I used Mark’s method because the field has to be introtext, not another one, but thanks to you gOmp, now I understand a little more about the flexibility of MODx. Great!