We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15451
    • 87 Posts
    i’m wondering how i could set up a page to have a section that would ’pull’ bits of info from another section into it [not in a news/blog type way though].

    so maybe a right hand column would have a link to another section within the site, and just under the link it’d have maybe the first 20 words or so from that page. i’d like to not set in stone exactly which page the link would go to, i’d like the manager of the site to be able to choose which one probably from page to page [ie no definite page within the template].

    am checking out http://modxcms.com/document-binding.html and wonder if i can somehow make it so the id is editable by the manager, if that makes sense? i wouldn’t want the whole page’s content to be pulled in though, just a bit of it...

    if this is possible, would there also be a way to insert an image with the link and text? i am very new to this, so if it calls for template variables or somehow making my own snippets, if anyone could point me to relevant tutorials as well i’d be really appreciative. cheers cheers...
      • 7231
      • 4,205 Posts
      You can use ditto to display the summary and link to the document. The way to let managers edit the source document(s) is to use a TV (Template Variable) as the document list.

      Other snippets that you can use to bring in data from other documents are GetField and DynContent.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 15451
        • 87 Posts
        thanks very much indeed. have tried out getField and DynContent and i like them a lot. am about to have a go with ditto...

        i’m a tad confused about how to call snippets. when i was trying out getField i found other people used something like [!getField? &docid=`7` &field=`introtext`!] and this worked fine. only when i was looking at the instructions on how to use getField [at http://modxcms.com/getField-667.html], there was info like:

        $docid [ int ]
        and $field [ string ]

        is there a different way to call them using the $ instead of the &? took me a bit of forum snooping to find out what to do so i’m wondering if i’ve missed reading some basic info about snippets somewhere, or if most people just have a lot more initial knowledge than i do?

          • 15451
          • 87 Posts
          ah, gold ganesh, thank you! you explained it beautifully, really appreciate the time you folks take to help me [and others] out. smiley