1

I have created a channel named as 'XYZ' and having following channel fields there :

1) user_type : text 


2) profile : grid

    a) first_name : text 

    b) last_name :  text

    c) user_name : text 

    d) age : text

Now i want to show user listing for a entry and i am having a text box in form and i want to search users from first_name or last name. i have used following code :

{exp:channel:entries channel="xyz" entry_id=1}
    {profile search:first_name="amit" search:last_name="amit"}
        {profile:first_name}<br/>
        {profile:last_name}<br/>
        {profile:user_name}<br/>
        {profile:age}<hr>
    {/profile}
{/exp:channel:entries}

But the code

{profile search:first_name="amit" search:last_name="amit"}

it is using 'and' condition but i want to use 'or' condition.

1
  • Would using a conditional in the results work for you instead of a search? i.e.: {if profile:first_name == "amit" OR profile:last_name == "amit"}... Jul 31 '14 at 14:23
1

You need to create custom query and it is ee bug and did not work such for OR conditions. Use custom query or query module and need to use join with channel and channel field and channel field data etc,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.