Author Topic: Alternative Search Term Usage (Repost)  (Read 770 times)

0 Members and 1 Guest are viewing this topic.

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Alternative Search Term Usage (Repost)
« on: July 30, 2012, 04:01:13 AM »
JMB-Jeremy  Posted: 03-26-2009 07:57am

--------------------------------------------------------------------------------
You can use the {$search_term} template value in the search-results.tpl template to display the search term that the user entered in meta tags, the title tag, etc. If you want to strip out special characters, you can use the {assign} template function like so:


{assign var=$search_term_stripped value=preg_replace('~[^a-z ]~i', '', $search_term)}
Then you can use {$search_term_stripped} to display the stripped value:


{$search_term_stripped|htmlspecialchars

Unofficial JMB Support Forums

Alternative Search Term Usage (Repost)
« on: July 30, 2012, 04:01:13 AM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
852 Views
Last post July 30, 2012, 03:54:58 AM
by a4evermedia
3 Replies
1153 Views
Last post December 08, 2012, 12:01:58 AM
by Chad
0 Replies
778 Views
Last post February 17, 2013, 07:37:20 PM
by chiplatham
3 Replies
1015 Views
Last post October 08, 2013, 07:58:46 AM
by a4evermedia
3 Replies
962 Views
Last post October 31, 2013, 04:27:18 PM
by mike22

anything