Setting a context variable canonical_url and passing it an appropriate URL sets the <link rel=canonical /> in the head section. That way accessing the same views through different paths (e.g. /category/<cat_slug>, /category/<cat_id>) yields in correct indexign by search engines.