We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10389
    • 11 Posts
    Hi

    I had a "little problem" with the navigationbar in the pictureTpl.
    When clicking the index, you will be lead to the first page of the gallery when using the &pics_per_page option instead of the page with the current pictures.
    I modify the template and write a little snippet for supporting it.

    The navigation section of the modified pictureTpl
    <p class="navigation">
    ...
        <a href="[+maxigallery.index_url+]?page=[[getSection? &picnr=`[+maxigallery.counter+]` &picperpage=`[+maxigallery.config.pics_per_page+]`]]">[+maxigallery.strings.index+]</a> | 		
    ...
    </p>
    

    original template:
    <p class="navigation">
    ...
        <a href="[+maxigallery.index_url+]">[+maxigallery.strings.index+]</a> | 		
    ...
    </p>
    


    and the following snippet:
    [[getSection]]
    <?php
    $pic_nr = isset($picnr) ? $picnr : 1;
    $pic_per_page = isset($picperpage) ? $picperpage : 1;
    $tmp = (int)(($pic_nr-1)/$pic_per_page);
    return ($tmp+1);
    ?>
    

    Or does you preview an other methode

    Yves
      • 7923
      • 4,213 Posts
      No, your solution is good one.. I can fix it to the next version though.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 10389
        • 11 Posts
        I hope other people may use this solution

        have all a nice day

        Yves