Show next and previous page title with pagination

Hello, Just wondering if anyone would have any suggestions to create this effect? The use case is for the title of the next and previous pages to appear alongside the pagination arrows. Any help really appreciated, thanks.

What sort of help do you need here? You just have to print the title of the page…?

Edit: See prev/next snippet below

Getting an undefined variable: articles error…

Ok, that was nonsense, sorry. For pagination it doesn’t actually make sense, you have to use a prev/next. navigation like in the starter kit.

directionPrev = @$flip ? 'right' : 'left';
$directionNext = @$flip ? 'left'  : 'right';
if($page->hasSiblings())): ?>
  <nav class="pagination <?= !@$flip ?: ' flip' ?> wrap cf">

    <?php if($page->hasPrevVisible()): ?>
      <a class="pagination-item <?= $directionPrev ?>" href="<?= $page->prevVisible()->url() ?>" rel="prev" title="<?= $page->prevVisible()->title()->html() ?>">
        <?= (new Asset("assets/images/arrow-{$directionPrev}.svg"))->content() ?><?= $page->prevVisible()->title()->html() ?>
    <?php else: ?>
      <span class="pagination-item <?= $directionPrev ?> is-inactive">
        <?= (new Asset("assets/images/arrow-{$directionPrev}.svg"))->content() ?>
    <?php endif ?>

    <?php if($page->hasNextVisible()): ?>
      <a class="pagination-item <?= $directionNext ?>" href="<?= $page->nextVisible()->url() ?>" rel="next" title="<?= $page->nextVisible()->title()->html() ?>">
        <?= (new Asset("assets/images/arrow-{$directionNext}.svg"))->content() ?>
    <?php else: ?>
      <span class="pagination-item <?= $directionNext ?> is-inactive">
        <?= (new Asset("assets/images/arrow-{$directionNext}.svg"))->content() ?><?= $page->nextVisible()->title()->html() ?>
    <?php endif ?>

<?php endif ?>

Cool, i’ll try and print the title by adapting the prevnext snippet. Thank you!