We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69bac3f commit fdde72fCopy full SHA for fdde72f
1 file changed
src/CmsSeoComponent.php
@@ -920,4 +920,30 @@ protected function _processPriority($content = "")
920
return $contentNewResult.$content;
921
}
922
923
+ /**
924
+ * @return $this
925
+ */
926
+ public function setNoIndexNoFollow()
927
+ {
928
+ \Yii::$app->view->registerMetaTag([
929
+ 'name' => 'robots',
930
+ 'content' => 'noindex, nofollow'
931
+ ], "robots");
932
+
933
+ return $this;
934
+ }
935
936
937
+ * @param string $canonicalUrl
938
939
940
+ public function setCanonical(string $canonicalUrl)
941
942
+ \Yii::$app->view->registerLinkTag([
943
+ 'rel' => 'canonical',
944
+ 'href' => $canonicalUrl
945
+ ], "canonical");
946
947
948
949
0 commit comments