Webmastersite.net
Register Log In

Refine search
add SEARCHTERM to text

Comments on Refine search

Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
Posted Jul 28, 2007 - 4:31 PM:

Hi,
in the search results, at the bottom my text says: "Narrow down to"
I can find it under "Language" here: {LANG_SEARCH_NARROWTO}

I want it to read the same, but including the current search term. Like this:
Narrow "Hello" down to

so I use this in {LANG_SEARCH_NARROWTO}:
Narrow {SEARCHTERM} down to

But this does not work, the result i get from this on my page reads out:
Narrow {SEARCHTERM} down to


what is wrong in my approach?



Regards, Starship-Trooper
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Jul 28, 2007 - 6:21 PM:

In 4.0.x, language replacements are made after the template has been processed so that a special exception has to be made to let template variables work in the language. So this isn't going to work, except in 4.1+ where language replacments are done at the time the template is loaded.

In 4.0 what you can do is edit it into the template instead of into the language.
Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
Posted Jul 29, 2007 - 5:56 AM:

ok. so in search.tpl, i will change
{LANG_SEARCH_NARROWTO} <input type="text" name="refine" size="15"> <input type="submit" value="{LANG_SEARCH_REFINE}" class="button">


to

Narrow "{SEARCHTERM}" down to <input type="text" name="refine" size="15"> <input type="submit" value="{LANG_SEARCH_REFINE}" class="button">


right?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Jul 30, 2007 - 2:23 AM:

Yes. Or if you want to keep it multilingual, you could make a {LANG_SEARCH_NARROW} ("narrow"), remove narrow from search_narrowto, and use
{LANG_SEARCH_NARROW} "{SEARCHTERM}" {LANG_SEARCH_NARROWTO}
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.