Keyword

ID Extrafield

  • Design
  • Design's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #146540 by Design
ID Extrafield was created by Design
Hello! I've been recently struggling to find a way to make the K2 item ID to display as an extrafield. I have been successful in doing it by php in a certain way that it will display exactly like a extrafield in the table as any other field. However, if I do it like that it will not be added to the database, and therefore, won't be a searchable field by any search component. Does anyone care to give me a light in the right direction to do something like that?
Thank you!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #146549 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Extrafield
Unfortunately by default this is not possible, you will need a custom plugin in order to do this.

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

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

  • Design
  • Design's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #146550 by Design
Replied by Design on topic ID Extrafield
Hey @Krikor. Do you have any idea what to suggest? Anyway I could send the ID together with the other extrafields? Which file I could alter?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #146560 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Extrafield
If you don't mind me asking, what is the purpose of this?
Are you setting the ID as a searchable label?
I am asking so I can propose the best solution.

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

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

  • Design
  • Design's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #146564 by Design
Replied by Design on topic ID Extrafield
Of course. Here's the deal. I'm creating a big archive of documents where I want all of them to create an automatic code that is searchable. I don't want my clients to have to create the code by hand, so we had the idea to white label the K2 ID. In this manner, I was able to show by PHP after every extra field table one more row, where I could show the K2 ID with a prefix, something like IHGB2-###.
So theoretically a new item would have in the extra field in the table something like this: "IHGB2-125".

So, all I want is to make this field searchable. I don't even require that the white label "IHGB" to be searchable, just the ID number. But it is not, by my frontend search tools.

Thank you!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #146567 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Extrafield
"Normal" search only looks in the item's content, not the extrafields.
One way to force K2 to look into ALL of the item's data (and get past MySQL's stop words) as well as search into tags and categories would be to enable Google Search integration.

I think that if you enable this setting (check K2's params) you won't need to map the ID into extrafields. The default frontend search will now "look" into your entire content.

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

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

  • Design
  • Design's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #146572 by Design
Replied by Design on topic ID Extrafield
Hmmm... the thing is, my main search on the site works through a plugin called Filter and Search for K2, and there is no google integration on it.

extensions.joomla.org/extension/filter-and-search-for-k2

But I may search a way to integrate it, somehow. I'll take a look into that option.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #146593 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Extrafield
Since you are using filtering, I think you should try the manual assignment of the field.

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

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

  • Design
  • Design's Avatar Topic Author
  • Offline
  • New Member
More
9 years 3 months ago #146598 by Design
Replied by Design on topic ID Extrafield
Hey!
The extension support helped me through it. Added a line of code to the plugin and now its working fine.
Thank you for the support till now!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #146603 by Krikor Boghossian
Replied by Krikor Boghossian on topic ID Extrafield
You 're welcome :)

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