I want to use the same template for my notes, replies, bookmarks, follows but then be able to have these go to different pages.
This is my general strategy and wanted to ask if I am heading down the correct path.
fields: category: label: URL type: url category: label: Type type: select options: mention reply bookmark following
(Haven’t figured out this part yet but thinking)
<?php return [ 'postype' => [ 'reply' => 'u-in-reply-to', 'bookmark' => 'u-bookmark-of', 'following' => 'u-follow-of', ] ]
Then I need to try and echo both the link and the selection field…I know this PHP is probably way off (advice welcome)
<a class="<?= option('posttype')>?>" href="<?= url('link') ?>"><?= url('link') ?></a>
Then I want to use routing to say “If a note or reply to go to this page, if bookmark to this page, and if following to this page”
I do not know how I would write the routes to specific pages based on the selection of either the Option or on how the tempaltes rendered.
Does this all sound possible? Am I on the correct track?
return [ 'routes' => [ [ 'pattern' => 'posttype(:any)', 'action' => ??????????????????? ]); } ] ] ]