Skip to content
Snippets Groups Projects
Commit aebe280d authored by Lily Yan's avatar Lily Yan
Browse files

Merge branch...

Merge branch 'feature/ISTWCMS-5705-a5kulkar-Prevent-webforms-from-being-indexed-removed-reduntant-code' into '1.0.x'

ISTWCMS-5705 Prevent webforms from being indexed removed redundunt code

See merge request !263
parents b62ebde1 de7ea13f
No related branches found
No related tags found
1 merge request!263ISTWCMS-5705 Prevent webforms from being indexed removed redundunt code
......@@ -1316,17 +1316,14 @@ function uw_cfg_common_fillpdf_form_form_pre_form_build_alter(FillPdfFormForm $f
function uw_cfg_common_preprocess_html(&$variables): void {
// Setting the meta tag for web forms getting indexed
// if not used any content.
if (!isset($variables['node_type']) || $variables['node_type'] == NULL) {
if ($variables['root_path'] === 'webform') {
$noindex = [
'#tag' => 'meta',
'#attributes' => [
'name' => 'robots',
'content' => 'noindex',
],
];
$variables['page']['#attached']['html_head'][] = [$noindex, 'noindex'];
}
if ($variables['root_path'] === 'webform') {
$noindex = [
'#tag' => 'meta',
'#attributes' => [
'name' => 'robots',
'content' => 'noindex',
],
];
$variables['page']['#attached']['html_head'][] = [$noindex, 'noindex'];
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment