Difference between revisions of "How to update Alphaindex bar with characters from other languages"

From JReviews Documentation
Jump to: navigation, search
(Created page with "JReviews Directory pages display an alphabetical index bar on top of the page: File:Alphaindex.png When visitors click on a specific letter, they will get all listings i...")
 
Line 10: Line 10:
  
 
Before making any theme changes, make sure you copy the theme file into your custom theme in [[JReviews Code Overrides|JReviews Overrides]].
 
Before making any theme changes, make sure you copy the theme file into your custom theme in [[JReviews Code Overrides|JReviews Overrides]].
 +
 +
If you open the file, you will find this loop which generates the english letter:
 +
 +
<source lang="php">
 +
<?php for ($i=65; $i<= 90; $i++):?>
 +
<?php $options[] = $Routes->alphaindex(chr($i),strtolower(chr($i)),$directory,array('class'=>'jrButton','rel'=>'nofollow'));?>
 +
<?php endfor;?>
 +
</source>
 +
 +
You can add the code for your custom letters above or below that code.

Revision as of 16:41, 15 July 2016

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

Alphaindex.png

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:

/jreviews/views/themes/default/elements/alphaindex.thtml

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 loop which generates the english letter:

<?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.