This topic contains 2 replies, has 2 voices, and was last updated by Yurii Muratov 8 years, 8 months ago.
- Topic
Hi,
Please I need some help. I’m trying to add 3 entities that I created using migrations on Oro Global Search (SearchBundle). Already created my search.yml and my search_template as well. The search is working partially but I have problems passing parameters to my route and also getting problems to show up my template on the search results.
1) In SearchController.php looks like it’s ignoring my search.yml/parameters. I don’t want to pass to my route the RecordID but a custom field called: ‘custno’.
Basically on OroSearchBundle:Search:searchSuggestion.html.twig it’s generating a link with this structure:
acme.dev/app_dev.php/testbundle/accounts/view/{RECORD_ID} and I want {custno}All search.yml examples that I found are using “parameters: id: id”. So, I’m not sure if it’s a bug or if I am doing something wrong.
2) Looks like the search is ignoring my search_template:
This is my search.yml:
12345678910111213141516171819Acme\Bundle\TestBundle\Entity\OroTestAccounts:alias: acme_test_accountslabel: acme_test.accounts.entity.labelsearch_template: 'AcmeTestBundle:Search:result.html.twig'route:name: acme_test_accounts_viewparameters:custno: acme_test_accounts.custnotitle_fields: [acme_test_accounts.custno]fields:-name: contacttarget_type: text-name: companytarget_type: text-name: custnotarget_type: textand this is my “Search:result.html.twig”
1234567{% extends 'OroSearchBundle:Search:searchResultItem.html.twig' %}{% import 'OroUIBundle::macros.html.twig' as UI %}{% set entityInfo = [{'title': 'Contact', 'value': entity.contact ? entity.contact : 'N/A'},{'title': 'Email', 'value': entity.email ? entity.email : 'N/A'},{'title': 'City', 'value': entity.city ? entity.city : 'N/A'},] %}
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.