Pages: [1]
  Print  
Author Topic: Simple implementation of the robot meta tag in Nucleus CMS  (Read 5213 times)
rork
Guest
« on: February 25, 2011, 12:23:09 pm »

'The first series I wrote on this weblog was about Web spiders covering their control and my views on how a site should be indexed. After installation I set up the robots.txt, however due to the way urls are made this has some limitations. Meta tags would be an excellent addition to this but I never got to implementing them into the CMS until now.

I expected that adding the metatags would mean changing the Nucleus CMS core or writing a plugin but it was much easier. There are conditional statements which can be used in the skins which allows to add different code for different skins among other things.

Because the articles are my main content and the other pages are important for navigation only the setup for the metatags is really easy. Articles will have follow,index and all other pages follow,noindex. Because these pages use different skins I use a conditional statement on skintype to set the meta tag conten.


<%if(skintype,item)%>
<META NAME = "robots" CONTENT = "follow,index">
<%else%>
<META NAME = "robots" CONTENT = "follow,noindex">
<%endif%>


In the default skin you can add this code to head.inc so it will be used on every html page.'
Logged
love
Guest
« Reply #1 on: April 21, 2011, 12:05:51 pm »

Whenever people wait to do everything until finally you're positive it's right, you'll in all probability never accomplish much of anything
Logged
Pages: [1]
  Print  
 
Jump to: