SEOTools2 with groups of keywords

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Locked
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

SEOTools2 with groups of keywords

Post by psy »

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:

Code: Select all

rubbish garbage keywords these~keywords~should~be~grouped
In the page template:

Code: Select all

{capture assign=seo2}{SEOTools2 showbase=1}{/capture}
{$seo2|replace:'~':' '}
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:

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' />
hth
psy
Locked

Return to “Tips and Tricks”