Redirect Canonical to another canonical


I would like to have 2 Canonicals that execute the same code. What is the best way to create a new canonical that redirects its input to an existing one?

I assume I can use mixes to create a new Canonical and a new set of Transforms that inherit the methods and properties of the first. Is there any other approach?


Hi Santiago,
Transforms can map to another Canonical.

So let’s say you have an existing canonical called CanonicalExisting, that you want to reuse with your new CanonicalNew.
You will have a transform called TransformCanonicalNewToCanonicalExisting as follows:

type TransformCanonicalNewToCanonicalExisting mixes CanonicalExisting transforms CanonicalNew {
  colA:   ~ expression 'colA'
  colB:   ~ expression 'colB'
  colC: ~ expression 'substring(colC,0,6)'

I hope this helps.