SEOTools2 with groups of keywords
Posted: Fri Jun 15, 2012 9:15 am
SEOTools is designed to filter out duplicated keywords to prevent keyword spamming. There are occasions (and quite a few requests) to allow the input of grouped keywords.
Rather than change the module, the solution can be achieve easily in the templates.
Firstly, on the page edit keywords screen, choose a character that you know will never be used in the meta section. In the example below, I've chosen the tilde character (~).
In your template, capture the SEOTools2 module and assign it to a var. Then put the var in the template with the replace modifier. Replace the ~ with a space.
Example:
Keyword edit screen:
In the page template:
The end result is that none of the words separated by a ~ are removed and the grouped words appear together without being separated by commas.
HTML output:
hth
psy
Rather than change the module, the solution can be achieve easily in the templates.
Firstly, on the page edit keywords screen, choose a character that you know will never be used in the meta section. In the example below, I've chosen the tilde character (~).
In your template, capture the SEOTools2 module and assign it to a var. Then put the var in the template with the replace modifier. Replace the ~ with a space.
Example:
Keyword edit screen:
Code: Select all
rubbish garbage keywords these~keywords~should~be~grouped
Code: Select all
{capture assign=seo2}{SEOTools2 showbase=1}{/capture}
{$seo2|replace:'~':' '}
HTML output:
Code: Select all
<meta name='description' content='This page covers the topics rubbish, garbage, keywords, and these keywords should be grouped' />
<meta name='keywords' content='rubbish, garbage, keywords, these keywords should be grouped' />
psy