Rel="me" in Kirby helper-generated links

I was looking up a way to include the rel attribute in a Kirby generated link from a structured field object titled Social, and tried this in the template:
<?= Html::a($social->url(), $social->platform()) ?>

Altered it like so, and it seems to work, but perhaps there’s a better way?
<?= Html::a($social->url().'" rel="me', $social->platform()) ?>

Thank you. All help appreciated.

This is syntactically incorrect (wrong placement of quotes). But apart from this, instead of string concatenation, use the third parameter (attributes array) for this purpose.

 <?= Html::a($social->url(), $social->platform(), ['rel' => 'me']) ?>
3 Likes

Thank you, Sonja.
I apologize but you have single handedly taught me 90+% of everything I know of PHP.
You’re a solid gold teacher and support person.
Deepbow.gif