It appears Google has somehow managed to crawl and index the /user/password page (according to Google Search Console) - is it possible to set it to "noindex" (without using Node noindex)?
If you install the Devel module, you can easily enable "Theme debug" and then you can see where everything is coming from and also get hints for what to call a template in your theme to override...
Posted33 min 45 sec ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:
Since I'm using a sub-theme of Snazzy, it would go in the sub-theme as a new file?
Neither Snazzy or snazzytoys currently have this file - snazzytoys is set as the default theme in...
Thanks! I've done that and restored everything back to the original condition.
I'm not sure I understand all that is in the snippet but I'll work on understanding what is happening...
Hi @ian
If you go on the admin bar to Configuration > Development > Configuration manager > Single Import/Export > Import
Then paste in this:
{
"_config_name": "views.view....
Posted2 hours 7 min ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:
Comments
I`m use JS:
var path = window.location.pathname.substring(1);
var noindex = ['user','search'];
noindex.forEach(el => {
if (path.indexOf(el) > -1) {
setNoindex();
return;
}
});
function setNoindex() {
var meta = document.createElement('meta');
meta.name = 'robots';
meta.setAttribute('content', 'noindex');
document.getElementsByTagName('head')[0].appendChild(meta);
}
Thanks for the suggestion, but I don't know where to put that.
This should be placed in your default theme script.js file.
https://docs.backdropcms.org/creating-themes
Since I'm using a sub-theme of Snazzy, it would go in the sub-theme as a new file?
Neither Snazzy or snazzytoys currently have this file - snazzytoys is set as the default theme in Backdrop.