We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2798
    • 22 Posts
    Hello from an absolute modx-beginner,

    I’ve a problem with ditto: I’ve a newslisting with pagination like this:
    [!Ditto? &parents=`23`&tpl=`dittowebreferenzenzweislide` 
    &sortDir=`ASC` &sortBy=`menuindex` &extenders=`summary` &display=`4`
    &paginate=`1` &paginateAlwaysShowLinks=`0` &tplPaginatePrevious=`dittoprevlink`
    &tplPaginateNext=`dittonextlink` &tplPaginatePage=`dittopageslink`!]


    with this tpl for the detailed page:

    <div class="portfolio_div_container">
    <div class="portfolio_div">
    <a class="linktowebrefbox" href="[~[+id+]~]" title="More details from [+title+]"><img title="More details [+title+]" src="[+referenzbildweb+]" alt="Here more details [+title+]" /></a>
    <div class="info_container">
    <div class="info">
    <div class="infoheader">
    <h3 class="webreflink"><a class="linktowebrefhead" href="[~[+id+]~]" title="More details [+title+]">[+title+]</a></h3>
    </div>
    <div class="infodescription">
    <p>[+summary+]</p>
    </div>
    <div class="webreflinks">
    <a class="linktowebref" href="[~[+id+]~]" title="more detailsfrom [+title+]">More Details</a>
    <a class="linktowebref" href="[+description+]" target="_blank" title="Seite [+title+] besuchen">Seite besuchen</a>
    </div>
    </div>
    </div>
    </div>
    </div>


    The ditto-listing is paginated as you can see above.

    My question is now: When i see the detailed information by clicking on
    href="[~[+id+]~]"

    how can i integrate a paginated backlink to my newslisting, e.g. like ".../index.php?id=20&start=4" into the detail-page???

    Maybe it’s nothing more than a newslisting with a paginated backlink, but i don’t know how to do this!

    thx in advance
      • 23571
      • 223 Posts
      Would something like this work for you?

      <a href="javascript: history.go(-1)">Back</a>
        • 2798
        • 22 Posts
        Hi Greg,

        of course we can go the easiest way, but to take no "shortcut" with javascript i’d like to use real URL’s from ditto. i’m sure ditto can do this, but don’t know how of course.... But thanks although.... wink
          • 26931
          • 2,314 Posts
          this should work ... create a snippet "linkback"

          <?php
          return $_SERVER['HTTP_REFERER'];
          ?>


          <a href="[[linkback]]">go Back</a>
            • 2798
            • 22 Posts
            Hi sharkbait,

            as you know now my problem is not to know php - me’s more the layouter and photoshopper/css-man! rolleyes

            Thanks a lot to you, the usefull small snippet is working best ever - and again i’ve learned a small thing more....

            have a nice weekend, and again thank you - i really don’t know how to deal with my small probs without community-help....

            barneyy