Adding multiple buttons by page drop down not working

I would like to add buttons by selecting the pages from a drop-down in the cms. Currently, I get a dash in front of the page name which looks like this: -about. When adding multiple pages/links it only uses the first url and visually looks like this: -about-project1-project2.

<?php if($buttonPage = $page->aboutSectionUrl()->toPage()): ?>
    <a href="<?= $buttonPage->url() ?>" >
        <?= $page->aboutSectionUrl()->title() ?>
    </a>
<?php endif; ?>

  aboutSectionUrl:
    label: About Button URL
    type: pages
    width: 1/4

Instead of using your defined variable, you start all over again. Continue with your variable $buttonPage which now hold the page object instead.

If the field can have multiple pages, use toPages() instead of toPage(), then of course with a loop.

Nice one thank you so much, I ended up putting it in a foreach loop.

<?php foreach ($page->aboutSectionUrl()->toPages() as $buttonPage): ?>
    <a href="<?= $buttonPage->url() ?>" >
        <?= $buttonPage->title() ?>
    </a>
<?php endforeach; ?>