Add a meta token

Sometimes you have to add some information that aren't visible on the page, for example the number of reviews, the best rating vote and so on.

In these case, the best way to deal with that is to create a Meta token: the token will be invisible to the user, but it's present inside the page HTML code, providing information to the search engine.

You can view these tokens inside Virtuemart template overrides.

In this example we'll add a meta token for the total number of reviews. First of all create a new Meta token and assign it a name and a property:

Then, in your template override, you have to add the following code (snippet taken from default_reviews.php):

Example 5.5. Meta Token

<span title="'.(JText::_("COM_VIRTUEMART_RATING_TITLE") . $num . '/' . $maxrating).'">
	{ VM_META_REVIEW_BEST_RATING:'.$maxrating.' }
	<span class="stars-orange" style="width:'. (24 * $num).'px">

Even in this case, the token is made by two parts: the token name and the value that will be used, joined together by a semicolon ( : ).