We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36575
    • 104 Posts
    rachelmarama1 Reply #1, 15 years ago
    I want to be able to use two of the tvs (thumbnail image and title text) from the next page in the sequence in my navigation.

    An example of a page that uses the similar thing:
    http://www.marthastewartweddings.com/photogallery/drew-and-andy

    This is the page I am trying to do this on:
    http://www.astrabridal.co.nz/article-test-3/

    Here's the code

    <li class="bottom"><a[[+classes]][[+title]] href="[[+href]]">Next</a> <img src="[[tv.ArticleImage]]" width="70" class="imgborder"> [[+tv.ArticleHeading]] </li>

    I have tried:
    [[+tv.ArticleHeading]]
    [[+ArticleHeading]]
    [[*ArticleHeading]]

    This is my getPage call:

    [[!getPage@articlePaging?
    &elementClass=`modSnippet`
    &element=`getResources`
    &parents=`[[*id]]`
    &tpl=`list-article-thumb-tpl`
    &limit=`1`
    &pageVarKey=`page`
    &includeTVs=`1`
    &processTVs=`1`
    &includeContent=`1`
    &showHidden=`1`
    &where=`{"template:=":28}`
    &sortdir=`ASC`
    &pageNavVar=`page.nav`
    &sortby=`menuindex`

    ]]

    Any help? Is what I want to do even possible?
      • 36575
      • 104 Posts
      rachelmarama1 Reply #2, 15 years ago
      This is the code, it was being stripped out:

      <li class="bottom"><a[[+classes]][[+title]] href="[[+href]]">Next</a> <img src="[[tv.ArticleImage]]" width="70" class="imgborder"> [[+tv.ArticleHeading]] </li>
        • 36575
        • 104 Posts
        rachelmarama1 Reply #3, 15 years ago
        and instead of [[tv.ArticleImage]]
        I have also tried code][[+tv.ArticleImage]] and code][[+ArticleImage]]
          • 33988
          • 110 Posts
          Quote from: rachelmarama1 at Sep 30, 2011, 12:27 PM
          This is the code, it was being stripped out:

          <li class="bottom"><a[[+classes]][[+title]] href="[[+href]]">Next</a> <img src="[[tv.ArticleImage]]" width="70" class="imgborder"> [[+tv.ArticleHeading]] </li>

          Looks like the only issue I can see is with this code. It should be
          [[+tv.ArticleImage]]
          not
          [[tv.ArticleImage]]
          as you have shown it. Good luck.
            Sal Sodano
            President & Co-Founder of SkyToaster
            My Website Salscode.
            • 36575
            • 104 Posts
            rachelmarama1 Reply #5, 15 years ago
            Hi Salscode, That's actually the first option I tried, and it definitely doesn't work.
              • 33988
              • 110 Posts
              I can't believe I didn't notice before. The way your getPage call is right now, it doesn't look like any resources will be displayed, so it is displaying your empty TPL. Change the begining of your getPage call to look like this:
              [[!getPage:default=`No results found`? &a=`b` ... ]]


              (note &a=`b` is me being too lazy to copy all your parameters into my example)

              And then see if your TPL is displayed or the message is displayed. If I am correct, you need to specify the &parents parameter or the &resources parameter to tell getPage which pages to get. Let us know how it goes and good luck.
                Sal Sodano
                President & Co-Founder of SkyToaster
                My Website Salscode.
                • 36575
                • 104 Posts
                rachelmarama1 Reply #7, 15 years ago
                Thanks for the help, but i'm not sure exactly what to change.

                The getPage call is working fine & getting all of the pages. It's just the second set of pagination (page.nav) that is not working, and the two pieces that are not being displayed are the image and text from the NEXT page in the set. It might be that it's not even possible, or I just need to define it another way.
                  • 36575
                  • 104 Posts
                  rachelmarama1 Reply #8, 15 years ago
                  ok, I think what I am doing is on the wrong track. I think I am going to need some custom code to find the next page in the sequence and retrieve two of the TVs to display in my navigation. If anyone has done anything like this before, please let me know!
                  thanks
                    • 34084 ☆ A M B ☆
                    • 756 Posts
                    I just wrote one to do just this, excluding the TVs but that's easy enough. Let me get it packaged and posted to the extras. If you need it sooner I can send you a PM with a download link in the meantime.

                    The one I create takes several parameters including the doc tree resource ID to use as the starting point (parent resource ID by default) and then a chunk name to use as the output. It looks for the next and previous sibling of the current resource.

                    You can see how I used it on my blog for a working example.
                    http://bit.ly/qqXZ3z

                    Here is quick example of the snippet call:
                    [[!mxSimplePrevNext? &mxspnChunk=`nextResourceLink` &mxspnReturnType=`next` ]]


                    Sample chunk:
                    <a href="[[~[[+mxspnNext]]]]" title="[[+mxspnNextTitle]]">[[+mxspnNextTitle:ellipsis=`25`]]</a>


                    Cheers
                      Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                      Visit CharlesMx.com for latest news and status updates.
                      • 36575
                      • 104 Posts
                      rachelmarama1 Reply #10, 15 years ago
                      hey thanks, a download link would be great. Rachel