Keyword

Customize Search Results page

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 3 months ago #97228 by Yiota
Replied by Yiota on topic Customize Search Results page
You should copy the components/com_search/views/search to templates/your_template/html/com_search and not in com_k2. It is not a K2 override, it is a search component override.

There you will edit the files to achieve the result you want.

Please Log in or Create an account to join the conversation.

  • Mihir Patel
  • Mihir Patel's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 3 months ago #97229 by Mihir Patel
Replied by Mihir Patel on topic Customize Search Results page
Thanks now the files overridden are being used I copied the file from components/com_search/views/search to templates/your_template/html/com_search/search and removed the folder view, and tmpl........ files are overridden and the changes have started affecting......

But the main thing is K2 displays items with the item image, its extrafields etc. How will I be able to access those in the overridden files ???

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 3 months ago #97230 by Yiota
Replied by Yiota on topic Customize Search Results page
If you want to use all the extras of the K2, images, extrafields, etc., then you should probably use the mod_k2_tools -> Search and the results would come to according to the generic.php page.

You can set the parameters for that list in K2 general parameters.

Please Log in or Create an account to join the conversation.

  • Mihir Patel
  • Mihir Patel's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 3 months ago #97231 by Mihir Patel
Replied by Mihir Patel on topic Customize Search Results page
Probably there i can display the images, extra fields but I dont get advanced search option in mod_k2_tools....Its just simple search......

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 3 months ago #97232 by Yiota
Replied by Yiota on topic Customize Search Results page
Either that or stick with the com_search. com_search can only provide you minimum listings. You cannot have images or extrafields, or whatever you have in K2 lists. You can only have title, introtext, category and a highlight span of the word you have searched for.

Please Log in or Create an account to join the conversation.

  • Mihir Patel
  • Mihir Patel's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 3 months ago #97233 by Mihir Patel
Replied by Mihir Patel on topic Customize Search Results page
Awww.... thats soemthing i dont wished at all.....probably have to find a way out possibly by dropping the use of K2....

Thanks for the prompt support...

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #97234 by Fone
Replied by Fone on topic Customize Search Results page
Hello!

And how could I edit the CSS of that search folder? there isn't a search.css file, just php. I want to edit the header, background, etc, like the rest of my template overrides so it looks like all my K2 items.

Thank you!

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 3 months ago #97235 by Yiota
Replied by Yiota on topic Customize Search Results page
Just write what you need to your template.css file.

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #97236 by Fone
Replied by Fone on topic Customize Search Results page
But wouldn't this change all of them?

I will have 2 pages which will have the same images: search results and user registration, both with the same title (as my header is an image, not an image background + a text title).

Thats why I need to insert these in a K2 item, so I can style them separately!

Thank you!

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 3 months ago #97237 by Yiota
Replied by Yiota on topic Customize Search Results page
Just use a different outer container and change the CSS according to this statement. i.e.

 

In all K2 pages you have stated .catItemIntroText, for the other page define in the file an outer container like searchContainer and write to your CSS .searchContainer .catItemIntroText.

 

This way you won't change anything that already exists.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum