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

    I’ve been working on a site all yesterday and today and it seems I’m just hitting brick wall after wall.

    I’ve given up with my AjaxSearch misery for the time being and am focusing on some Ditto confusion instead.

    Basically I’ve enabled pagination and I want to template the previous and next buttons in a chunk. My call is as follows:

    [[Ditto? &startID=`1` &summarize=`3` &display=`3` &commentsChunk=`CommentsBlog` &tpl=`BlogTemplate` &dateFormat=`%b <br /> %d` &tagData=`tvtags` &tagDelimiter=`, ` &sortBy=`publishedon` &paginate=`1`  &paginateAlwaysShowLinks=`0` &tplPaginatePrevious=`previous` &tplPaginateNext=`next`]]


    The chunk ’previous’ contains the following:

    <div id="newerposts">
    <a href="[+url+]">Newer Ones</a>
    </div>


    and the chunk ’next’ contains the following:

    <div id="olderposts">
    <a href="[+url+]">Older Posts</a>
    </div>


    My problem is that by default Ditto wraps the chunk in the link to the ’previous’ and ’next’ pages. I want to be able to define the link within the chunk and not have it automatically wrapped round my DIV.

    Does anyone have a clue what I can do? I’ve tried separating the DIV into the document body instead of in the chunk but then I’m left with an empty button if you’re on the last or first page.

    Any help would be wondrous.

    Edit -

    I’ve resolved the issue now. I had to hack the file ditto.class.inc.php round about line 992.