Hi, I want to insert a button for going to the next listed project-page.
I’ve found the following:
<?php if($next = $page->nextListed()): ?> <a href="<?= $next->url() ?>">> <?php echo $next?></a> <?php endif ?>
I inserted "> <?php echo $next?>", so the button is named like the next project, but it also displays the surrounding folder. So what I want to achieve is a button name like this: “> Project-2” and for now it displays “> Projects/Project-2”
Is there a way to remove the folder name? If I type “$next = $subpage” instead of “$next = $page”, the page crashes.