We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35384
    • 26 Posts
    Ths is probbaly the most simplest of questions but as a newbie I cant work it out. I have a template in revolution that creates detailed pages. Using a chunk I can make a page which lists the main heading and intotext of those pages. What i need to be able to do is now link to those pages from that list by getting the page ID into the chunk. Can anyone point me in the right direction?
    • I'm a little confused about what you need. Your template creates pages? And this chunk, what does it contain?

      The template ideally should contain either chunks that contain your page's markup (such as header, content surrounded by layout, footer) or all of that directly in the template.

      In your chunk, you speak of it listing "those pages". Which pages? Are these pages MODX resources? If not, they should be.

      To pluck resources out of MODX and display on pages, you'll want to use the getResources snippet. Found in package management. With that, you can pull links to resources any time, any place you like.
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 35384
        • 26 Posts
        Sorry wasn't clear.

        In my 20 or so information pages I have Template variabales:
        Heading
        Subheading
        Main descripttion
        Venue name
        Date and a few others

        Then on a seperate page I want to summaries all those pages and a link to them. So in a chunck I have:
        +tv.ShowTitle]]
        +tv.ToFromDates]]
        a href="#">More info
        (some of the code is missing here bacause i had to remove it to make it visible. I dont know how to post the code in here)

        This chunk is called into the list page from the getResources snippet and everything works OK .
        getResources?
        &parents=`2`
        &tpl=`WhatsOnListItem`
        &includeTVs=`1`
        &processTVs=`1`


        I want to be able to dynamically add the pages link id's to the "list page" so it links to the detailed pages from a button. But I dont know what to replace <a href="#"> with to get the page links.

        [ed. note: macboy25 last edited this post 11 years, 5 months ago.]
          • 35384
          • 26 Posts
          Ah Ha ! I found the solution in the following video

          https://www.youtube.com/watch?v=C2oBzl5ZhmY
          • I assume that
            [[~[[+id]]]]
            is what you were looking for.

            To place code into the forum, wrap the code with the forum code tag by using the <> button just atop the reply box.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 35384
              • 26 Posts
              Yes that is it. Much appreciated