Keyword

Extra fields in search results

  • Evert Bal
  • Evert Bal's Avatar Topic Author
  • Offline
  • New Member
More
14 years 11 months ago #74575 by Evert Bal
Extra fields in search results was created by Evert Bal
Does anyone knows a solution for showing the extra fields in the search results?

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

More
14 years 5 months ago #74576 by Viktoria Sab
Replied by Viktoria Sab on topic Extra fields in search results
Hi, I am interested too. PLZ, some references...

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

  • Evert Bal
  • Evert Bal's Avatar Topic Author
  • Offline
  • New Member
More
14 years 5 months ago #74577 by Evert Bal
Replied by Evert Bal on topic Extra fields in search results
Hey,

I didn't found a solution for K2. So I switched to mosets' Hot Property.

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

More
14 years 4 months ago #74578 by Daniel Arnolf
Replied by Daniel Arnolf on topic Extra fields in search results
As far as I understand, you can't search through extra fields.
Something came up, check this module: labs.smartwebstudio.com/ , it does the job but it is a separated search module, just to search a single category, child categories, a chosen extra field etc, it even have other options like select box to filter by a determined item into a drop down extra field, which will avoid tags for filtering results.
You can use various instances of the module in same page to search and select by different criteria.
It outputs the filtered result through generic.php, which is a drawback since you can only override once, and affect the output of tags and author at the same time. I'm waiting for an answer from the developer to see if is possible to get the results assigned to a custom template override, and avoid changing the generic.php.
Another thing to notice, is that to get it to work, you may have to do a few slight changes to the K2 core files, the author provides the needed override, as well as the backup to restore the original core files.
Hope it helps.

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

More
14 years 4 months ago #74579 by Simon Wells
Replied by Simon Wells on topic Extra fields in search results
Just a quick thought process, and I cant see why it could not be done and without a core hack.

Instead of using generic.php, it could be routed to use the item.php instead, but with these things, it would require a few hours coding to implement such a thing.
Not sure which search module your using, but the K2 search uses joomla search and that picks up K2 items and categories, so it should be possible to include a template over ride to allow search by extra field data, as its just a DB query, easy stuff ;)

I can recommend some "trusted" coders which I know can handle the k2 code, but it is worth noting that you would most likely have to cross some palms with silver.

If, there are several users that require this kind of function, then that would make it more viable.

Lets keep this open and see what we can come up with.

Regards,

Simon
K2 Support

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

More
14 years 4 months ago #74580 by Daniel Arnolf
Replied by Daniel Arnolf on topic Extra fields in search results
Hi Simon.

I will really appreciate if you can connect me to a Joomla - K2 coder to solve this issue.
Here is the some information on the module I'm using: labs.smartwebstudio.com/ , it does exactly what I need, it searches and filters extra fields contents.
Since I'm trying to create a kind of phonebook with about 13 extra fields, no content or images, I want to override the output to display a table, but I won't actually have an item.php view, just the category_item.php will do. The only thing stopping me is the fact that the module outputs through generic.php, if I can route it to print trough a custom template, I'm done.
I apologize to the members of the discussion if I get out of context with my comment, but I found no way to contact Simon directly.

Thank you very much.
Daniel Arnolf

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

More
13 years 9 months ago #74581 by Dragan Todorovic
Replied by Dragan Todorovic on topic Extra fields in search results
add this in generic.php

<?php

$custom = json_decode($item->extra_fields);

$first_xfield    =  $custom[0]->value[1];

?>

 

<?php echo $first_xfield ?>

 

to find all

 

do

 

print_r ( $custom);

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

More
13 years 3 months ago #74582 by Jock
Replied by Jock on topic Extra fields in search results
I'm not sure if my problem is related or not but I have the following issue:

 

I want my search results to have the snippet of text with the highlighted keyword(s) for content that is in extra fields. Currently it is returning the matching item but not with any snippet text even though it is there.

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

More
13 years 3 months ago #74583 by BBC
Replied by BBC on topic Extra fields in search results
It is a template styling issue, not K2.

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

More
13 years 3 months ago #74584 by Jock
Replied by Jock on topic Extra fields in search results
Hi BBC,

 

Could you explain how I would resolve this? As far as I can tell K2 items are being returned in the search but with empty paragraph tags where the snippet should be.

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


Powered by Kunena Forum