string smarty_function_keywords(
array $params, &$smarty, object $smarty)
|
|
Smarty function to get the meta keywords
This function will take the contents of the page and transfer it into a keyword list. If stopwords are defined, they are filtered out. The keywords are sorted by count. As a default, the whole page contents are taken as a base for keyword generation. If set, the contents of "contents" are taken. Beware that the function always returns the site keywords if "generate meta keywords" is turned off. PLEASE NOTE: This function adds additional overhead when dynamic keyword generation is turned on. You should use Xanthia page caching in this case.
available parameters:
- contents if set, this wil be taken as a base for the keywords
- dynamic if set, the keywords will be created from the content / mainconent
oterwise we use the page vars. The rules are:
1) If dynamic keywords disabled in admin settings then use static keywords
2) if parameter "dynamic" not set or empty then always use main content (default),
3) if parameter "dynamic" set and not empty then use page vars if any set - otherwise use content.
- assign if set, the keywords will be assigned to this variable
Example <meta name="KEYWORDS" content="<!--[keywords]-->">
Tags:
Parameters
| array |
$params |
All attributes passed to this function from the template |
| object |
$smarty |
Reference to the Smarty object |
| |
&$smarty |
|