Keyword

Template for search results

  • Bam Bam
  • Bam Bam's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150915 by Bam Bam
Template for search results was created by Bam Bam
Hello everybody,

I'd like to know how I can change the "search results" template. Can't find it anywhere. :(
The reason why I want to change it is: in the result list the item image gets a link to the article, but I'd like to have a modal popup with the image in it. Is that possible somehow?

Thanks.
Matthew.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150924 by Krikor Boghossian
Replied by Krikor Boghossian on topic Template for search results
Hello Matthew,

The file used to display the search results is the generic.php.
In order to override it, please read this post: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Bam Bam
  • Bam Bam's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150928 by Bam Bam
Replied by Bam Bam on topic Template for search results
Thanks for the advice.
I read the post, but was not able to make any changes take effect. Even editing the original generic.php file didn't make any changes. Can you tell me what went wrong?
I already worked with template-overrides before, but never needed to get the search results page changed. What is the sense of the generic.php? How does the generic.php affect the template?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150930 by Krikor Boghossian
Replied by Krikor Boghossian on topic Template for search results
The generic.php is used for K2 search listings.
If you are using the regular search results you need to override com_search which is a core extension.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Bam Bam
  • Bam Bam's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150932 by Bam Bam
Replied by Bam Bam on topic Template for search results
Ehem... Now I see, I've worked the whole time on the wrong template. Already installed four.

I need to edit the link-tag in the category_item.php. Do you've got an idea how I get a modal popup included?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150935 by Krikor Boghossian
Replied by Krikor Boghossian on topic Template for search results
You can use Joomla!'s modal as in K2's items, or better yet you can include a new lightbox engine like fancybox or Bootstrap's modal if your template is using Bootstrap.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum