[SOLVED] Search module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

[SOLVED] Search module

Post by wmdvanzyl »

Is there a way to change the prompt for the search module?

Code: Select all

{$startform}
{* topsearch *}{* <label for="{$search_actionid}searchinput">{$searchprompt}:&nbsp;</label> *}
{* leftsearch *} <div id="leftSearchLabel"><label for="{$search_actionid}searchinput">{$searchprompt}:&nbsp;</label></div>
I could just hard code {$searchpromt} to the text i want it to be, but that is very crude. I don't see an option to change it under the search module options. There is only an option to change the default search text.

I also don't see an option to change it via a parameter:

Code: Select all

    (optional) lang="en_US" - Deprecated - Override the current language that is used for selecting translated strings.
    (optional) inline="false" - If true, the output from the search form will replace the original content of the 'search' tag in the originating content block. Use this parameter if your template has multiple content blocks, and you do not want the output of the search to replace the default content block
    (optional) passthru_*="null" - Pass named parameters down to specified modules. The format of each of these parameters is: "passtru_MODULENAME_PARAMNAME='value'" i.e.: passthru_News_detailpage='newsdetails'"
    (optional) modules="null" - Limit search results to values indexed from the specified (comma separated) list of modules
    (optional) resultpage="null" - Page to display search results in. This can either be a page alias or an id. Used to allow search results to be displayed in a different template from the search form
    (optional) searchtext="null" - Text to place into the search box
    (optional) detailpage="null" - Used only for matching results from modules, this parameter allows specifying a different detail page for the results. This is useful if, for example, you always display your detail views in a page with a different template. (Note: modules have the ability to override this parameter.)
    (optional) submit="Submit" - Text to place into the submit button
    (optional) action="default" - Specify the mode of operation for the module. Acceptable values are 'default', and 'keywords'. The keywords action can be used to generate a comma seperated list of words suitable for use in a keywords meta tag.
    (optional) pageid="null" - Applicable only with the keywords action, this parameter can be used to specify a different pageid to return results for
    (optional) count="null" - Used with the keywords action, this parameter will limit the output to the specified number of words
    (optional) search_method="get" - Pretty Urls Compatibility via Method POST, default value is always GET, to make this work just put {search search_method="post"} 
So what is the best way to change it? I want it to say Google...JUST KIDDING! :p
Last edited by wmdvanzyl on Fri Aug 09, 2013 8:22 am, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: Search module

Post by Jo Morg »

It's a language string, you can customize it easily without having to touch the original lang files.
HTH
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

[solved] Search module

Post by wmdvanzyl »

Jo Morg wrote:It's a language string, you can customize it easily without having to touch the original lang files.
HTH
Elegant solution and available in the CMSMS core. Exactly what i needed. Thanks!
Post Reply

Return to “Modules/Add-Ons”