How to access replacement tokens present in views field rewrite output in its .tpl file of that field I've created a view and I want to manipulate the field output to show bar graph instead of field value.

I'm using bootstrap 3's progress bar as the bar graph, but I'm unable to set width of the progress bar to show progress as drupal doesn't allows style attribute inside "Rewrite the output of this field" in views.

So, I decided to create that field's tpl file now the problem is how can I access the Replacement tokens in the tpl file that are available in "Rewrite the output of this field"

$data = $row->{$field->field_alias} this prints numbers 1 2 3 4 5 ....
Under the Field settings, you can add a class to the field:



this can accept replacement tokens, so for example you could:


create 5 classes each with a different length
add a field prior to this field that will calculate the correct length
use the replacement token of the calculated field to include the proper class:  barsize1, barsize2, barsize3, etc