housikrausi
8 years agoExpert
Code snippet for noindexing several archive folders
 Hi Everybody,     i´m working on a archiving strategy for our community at the moment. As descibed in the how to article I have to ad a noindex Tag to the read only archiv named "Test-Archive" board ...
- 8 years agoBelow is updated code. <#if coreNode.id == "Test_Archive" || coreNode.id == "Test_Archive2"> <meta name="robots" content="noindex,follow"> </#if> 
- 8 years agoYes, you can replace my old code with this one. 
 e.g for 12 categories//Assign all the categories id below. 
 <#assign catIDs = ["Test_Archive2","Test_Archive", "Test_Archive3", "Test_Archive4", "and so on.."] /> <#if catIDs?seq_contains(coreNode.id)> <meta name="robots" content="noindex,follow"> </#if>In above example you just need to update in catIDs variable, the condition will be same.