Keyword

Override Generic.php (for search results)

  • Christiaan Färber
  • Christiaan Färber's Avatar Topic Author
  • Offline
  • New Member
More
8 years 5 months ago #153197 by Christiaan Färber
Override Generic.php (for search results) was created by Christiaan Färber
Hi,

I'm currently working on a project where i want to combine K2 with the module K2 filter and search.
But i'm having problems with te results list after filtering.

The webpage is : thsa.studiomod.us/projecten

The problem is that when i use this module the page gets all the items by its category, but i can't find a way to style this.
I read a lot of articles where they say i have to override the template file 'generic.php' and place it in the TEMPLATENAME/html/com_k2/ folder.
But when i change this nothing happens even if i edit the main 'generic.php' file in /components/com_k2/templates/ folder.

Does any one know how i can style my results ? (itemList)

Thanks in advance,
Christiaan

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

More
8 years 5 months ago #153198 by Javi Mata
Replied by Javi Mata on topic Override Generic.php (for search results)
try using a different name in the html folder :-S and select this template in the menu link or in the category configuration

Twitter: @Javi_Mata
Web: www.javimata.com

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

  • Christiaan Färber
  • Christiaan Färber's Avatar Topic Author
  • Offline
  • New Member
More
8 years 5 months ago #153201 by Christiaan Färber
Replied by Christiaan Färber on topic Override Generic.php (for search results)
Hi Javi,

Thanks for helping but i have try'd this already and i still see no change...
I can style all k2 items by doing this except the page where i use the filter and search module and filter on category.

Do you reckon this is a 'module' problem maybe ?

Greets,
Chris

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

  • Andrey Miasoedov
  • Andrey Miasoedov's Avatar
  • Offline
  • Senior Member
More
8 years 5 months ago #153217 by Andrey Miasoedov
Replied by Andrey Miasoedov on topic Override Generic.php (for search results)
Hello, Christiaan.

Sorry, by default the filter uses template file based on standard K2 generic.php file, but it is with some modifications.
You can change its parameters in K2 generic parameters section 'Layout & view options for Search & Date listings'.
Also, you can manually edit template file - plugins\system\k2filter\K2Filter\templates\filter.php
You can override this file as standard k2 template file in your_template/html/com_k2 folder.

In your case, please, just try to change module parameter 'Search results template' to 'Category' and fill some category id into 'Category Id' parameter (at the top). In this case it will use your category template files.

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


Powered by Kunena Forum