Page 1 of 1

LISE search a particular field

Posted: Thu Nov 21, 2019 10:13 am
by blast2007
Hi all,
I would like to search for custom field, but instead of filling requested term in the search form I want to search using term as a parameter in my template.

The workaround found was to create an url in template like this
{assign var="searchterm" value="work"}

<a href="http://www.mysite.com/index.htm?mact=LI ... searchterm}[/b]&submit=Search">Show all items with custom field {$searchterm}</a>
Can I achieve the same result using only native module options?
Thanks and regards.
b.

Re: LISE search a particular field

Posted: Fri Nov 22, 2019 3:26 pm
by velden
(optional) search="" - Search all fields. Uses fulltext search. Can be combined with filter search.
(optional) search_*="" - Search a particular field. You can use 'title' or the alias of a field definition, e.g. search_title. Can be combined with fulltext search. Multiple search_* params can be combined.

Re: LISE search a particular field

Posted: Mon Nov 25, 2019 7:26 am
by blast2007
Hi velden,
thanks for your reply, I know search parameter. This parameter call a form and you have to input search terms.
{$formstart} ... {$formend}

But it's not what I need as explained above.

velden wrote:
(optional) search="" - Search all fields. Uses fulltext search. Can be combined with filter search.
(optional) search_*="" - Search a particular field. You can use 'title' or the alias of a field definition, e.g. search_title. Can be combined with fulltext search. Multiple search_* params can be combined.

Re: LISE search a particular field

Posted: Mon Nov 25, 2019 8:17 am
by velden
That is not true.

Code: Select all

{LISEextras search="ham"}
Seems to work.

What I didn't get to work is {LISEextras search_title="ham"} but that needs another syntax. No time to look into that now.

Re: LISE search a particular field

Posted: Mon Nov 25, 2019 8:32 am
by blast2007
It works!
The problem was

Code: Select all

action="search"
It shouldn't be used.
{LISEextras action="search" search="ham"}
Thanks a lot!
best regards
velden wrote:That is not true.

Code: Select all

{LISEextras search="ham"}
Seems to work.

What I didn't get to work is {LISEextras search_title="ham"} but that needs another syntax. No time to look into that now.