0

i have a portfolio component in my joomla web site with some article and image there , but when i search for them in my site with search module , search module do not find them and just searching in my article , contacts and my tags ! how i can set search module to search in my components too ? i need other plugin or some thing to write in codes or ...? thanks.

It is my portfolio component

and its my search resulte

1 Answers1

2

You can create a plugin by following this tutorial :

https://docs.joomla.org/J3.x:Creating_a_search_plugin

Toretto
  • 4,721
  • 5
  • 27
  • 46
  • i created one , but where of this codes i should write to search in portfolio component ? i am not good in php. – Amir Hosein Navari Aug 25 '15 at 12:46
  • 1
    you need to modify the onContentSearch fucntion with your custom query for portfolio.There is $text parameter which will have the value of whatever you will put to search. then you need to build the query to fetch the result which have the content like the search term. Hope you will understand. – Toretto Aug 25 '15 at 12:53
  • Thanks for your answer but i did not understand. – Amir Hosein Navari Aug 25 '15 at 12:55
  • can u say with a easy language ? as i told , i do not know php language . – Amir Hosein Navari Aug 25 '15 at 12:56
  • 1
    Copy the one for articles and just modify it. – Elin Aug 26 '15 at 01:18
  • @Elin Where of this article and php file need to modify for a component with example name "portfolio" ? i created one pluging same this tutorial "https://docs.joomla.org/J3.x:Creating_a_search_plugin" but do not work because i do not know where need to modify and change ! can u help me please? – Amir Hosein Navari Aug 26 '15 at 10:27
  • 1
    Did you ask the developers if they have a search plugin? As I said just go to the plugins/search folder and make a copy of the articles plugin and rename everything as needed. – Elin Aug 26 '15 at 11:44