Mark, but here’s an example usage
let’s assume you have a page with list of weblog entries on a single-page entry and you want to highlight the titles of previous and next entry. Let’s also assume you supply entry_id in URL
the code would look like
{exp:weblog:entries entry_id="{segment_3}"}
{body}
{/exp:weblog:entries}
Now list all entries:
<ul>
{exp:weblog:entries entry_id="{segment_3}"}
<li>
<a href="{path=site/{entry_id}}">{title}</a>
{if "{entry_id}"=="{exp:math:subtract num1="{segment_3}" num2="1"}"} - this is prev entry
{if "{entry_id}"=="{exp:math:add num1="{segment_3}" num2="1"}"} - this is next entry
</li>
{/exp:weblog:entries}
</ul>
Note that I did not check this example yet
ANOTHER EXAMPLE
I used the plugin to make prev/next links for Solspace Gallery Extended.
I have only one gallery, but the pictures are linked to different entries, so regular prev/next linking does not work for me.
So I have in CSS
.navlink {
display: none;
}
and in template
{exp:gallery_extended:entries related_id="{segment_4}" type="weblog" disable="member_fields|date_fields"}
{if gallery_entry_id < segment_3}
<a href="{path=" class="navlink" id="navlink{count}">prev</a>
{/if}
{if gallery_entry_id == segment_3}
[removed]
$(document).ready(function() {
$('#navlink{exp:math:subtract num1="{count}" num2="1"}').css('display', 'inline');
$('#navlink{exp:math:add num1="{count}" num2="1"}').css('display', 'inline');
});
[removed]
{/if}
{if gallery_entry_id>segment_3}
<a href="{path=" class="navlink" id="navlink{count}">next</a>
{/if}
{/exp:gallery_extended:entries}
Note that you must use jQuery, have image ID in segment_3 and related weblog entry in segment_4