This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

lucas.sanner54070
lucas.sanner54070

I'd like my component to inject a canonical link just like it would for a css link.
For instance:

public function loadPost()
{
   ...

   $this->addCss(url('plugins/rainlab/blog/assets/css/extra.css'));

   ...
}

will give:

  <head>
      ...

      <link rel="stylesheet" href="http://mydomain/plugins/rainlab/blog/assets/css/extra.css">

      ...
  </head>

Is there any way to do the same with a canonical link ?

mjauvin
mjauvin

You can use a placeholder in your layout.

ref. https://octobercms.com/docs/cms/layouts#placeholders

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.