2013-09-12, 21:21:17
So long as there is a variable/function that calls the desired slug, you can use it on any content type.
For example, with i18n Special Pages, the function to call (assuming this is the actual page's slug, and not a custom/special field) would be:
For search, it might be:
So to display it, simply use the appropriate slug-call (e.g. for special pages it is...):
Where $showAverage and $showTotal are booleans (true/false).
You can also prefix your slugs so that they are unique and don't clash with existing page slugs (this needs to be done before the first vote on that entry is cast). So for example, if used for blog entries, you may want to use:
For example, with i18n Special Pages, the function to call (assuming this is the actual page's slug, and not a custom/special field) would be:
PHP Code:
return_special_field('slug')
For search, it might be:
PHP Code:
$item->slug
So to display it, simply use the appropriate slug-call (e.g. for special pages it is...):
PHP Code:
matrix_rateit(return_special_field('slug'), $showAverage, $showTotal)
Where $showAverage and $showTotal are booleans (true/false).
You can also prefix your slugs so that they are unique and don't clash with existing page slugs (this needs to be done before the first vote on that entry is cast). So for example, if used for blog entries, you may want to use:
PHP Code:
matrix_rateit('blog-'.return_special_field('slug'))