So how do I do meta tags for pages that I don’t want keywords and descriptions, but a nofollow. and vise-versa without having extra html?
What I see is that pages with descriptions and keywords will look like this.
<meta name="keywords" content="these, are, my, keywords" />
<meta name="description" content="Here is a description" />
<meta name="robots" content="" />
And then for pages with nofollow it will look like this.
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="robots" content="nofollow" />
I guess it just seems to me that there is extra html that is being inserted on to the page, a lot like what dreamweaver does. Am I wrong on that thought?
Is the only way to properly do this is to use a snippet to check if the TV has a value and then output the metas? Like:
<?php
if($modx->getTemplateVar("tv_keywords") != "")
{
echo "<meta name='keywords' content='". $modx->getTemplateVar("keywords") ."' />";
}
?>
I know the syntax may not be right, but you get the idea.