Streaming live at 10am (PST)

Canonical Link with CMS-Pages


Hey Community,

is there a way to give CMS pages a canonical?
I´ve found this in the forum, but it doesn´t worked.

I´ve tried this (see screenshot) with a non cms page and it worked pretty well, but how can I get the same result with cms without adding an additional field, than we already have 59 items in use and I would like to avoid taking the last item for this.



It is possible! You need to add a field in the collection for the canonical link. Then add the URL for the page in the collection. Finally you can dynamically add the canonical link in the page settings for your CMS page like this:

Hope this helps!


Thank you for your reply @LJB.

I know that I could solve it by adding a CMS field with the canonical, but we have only one field left in our collection and I really would try to avoid taking the last item. Also its really static if paste the exactly URL in this field.

I hoped that there is a function like get path or so.



Is there really no other solution?


Does anyone know how to extend this custom code with some logical javascript operators?

I would like to do the following:

Set up CMS with “Canonical” field.
In custom code.

  1. If “Canonical” field is empty set canonical URL to current url.

  2. If “Canonical” field is not empty set Canonical URL to “Canonical”