How to update Alphaindex bar with characters from other languages

From JReviews Documentation
Jump to: navigation, search

JReviews Directory pages display an alphabetical index bar on top of the page:


When visitors click on a specific letter, they will get all listings in a directory that begin with the letter.

By default only letters from the english alphabet are included. If you want to include additional letters from your language, you will need to update the theme file of the alphaindex bar which is located here:


Before making any theme changes, make sure you copy the theme file into your custom theme in JReviews Overrides.

If you open the file, you will find this block code which generates the english letters:

<?php for ($i=65; $i<= 90; $i++):?>
	<?php $options[] = $Routes->alphaindex(chr($i),strtolower(chr($i)),$directory,array('class'=>'jrButton','rel'=>'nofollow'));?>
<?php endfor;?>

You can add the code for your custom letters above or below that code.

For example, adding these two lines of code will include the α and β characters from the Greek alphabet:

<?php $options[] = $Routes->alphaindex('α','α',$directory,array('class'=>'jrButton','rel'=>'nofollow'));?>
<?php $options[] = $Routes->alphaindex('β','β',$directory,array('class'=>'jrButton','rel'=>'nofollow'));?>