Structure field entry when fetching via Select field

Hey there,
I want to show related pages, hand-picked via structure field entries. So far I successfully dodged all errors on the way and ended up with this:

# blueprint file

title: Post

pages: false

fields:

  # ...

  related:
    label: Related posts
    type: structure
    fields:
      post:
        label: Post
        type: select
        options: siblings
// template file
    <?php foreach($page->related()->toStructure() as $related) : ?>

    <?php
      $uri = $related->post()->value();
      $post = $page->siblings(false)->find($uri);
    ?>

    <li>
      <h3>
        <a href="<?= $post->url() ?>">
          <?= $post->title()->html() ?>
          <small><?= $post->date('d M Y') ?></small>
        </a>
      </h3>
    </li>
    <?php endforeach ?>

Now, everything’s fine so far, except as entry of the structure field, I’d like to show the real title (of the “selected” page), not the uri - that possible?

Not out of the box. But there is an extended structure field called snippet field which you can use to achieve this.

Yeah, seems to be the only way left …

Another option would be to save the title instead of the URI, but then if you happen to have more than one post with the same title, things might go wrong.