Display of order function

1 view
Skip to first unread message

markus_86

unread,
Jan 29, 2010, 10:47:29 AM1/29/10
to Searchlogic
Hello,

if this question is stupid, I'm really sorry. But I'm a beginner and
couldn't find a solution so far.
I'm ordering via <%= order @search, :by => :title %> | <%= order
@search, :by => :rating %>

It generates this output in the browser:
Sortieren nach: Title | Rating

Is it somehow possible to display another string, than the name of the
variable?

I tried <%= order @search, :by => :title %, "Test123"> but this
doesn't work.

I also tried to work with the locales en.yml, with an entry Title:
"Test123" but it didn't work nor.

markus_86

unread,
Jan 29, 2010, 2:25:06 PM1/29/10
to Searchlogic
Hey,

I found it out on my own. Maybe someone else can need it in the
future

with , :as => "Titel" you can change the displayed string

example:
<%= order @search, :by => :title, :as => "Titel" %> |
<%= order @search, :by => :rating, :as => "Bewertung" %>

Reply all
Reply to author
Forward
0 new messages