Answers.Body: <p>By "buttons", I assume you mean the buttons referenced in the screenshot below.</p>
  
  <p>It's not recommended to edit the .tpl files directly - it's hard to maintain, and will be overwritten any time you upgrade.  Instead, it's preferable to use an extension with <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_links/" rel="nofollow noreferrer">hook_civicrm_links</a>, which allows you to inject your own links.</p>
  
  <p>My <a href="https://github.com/MegaphoneJon/com.megaphonetech.fastactionlinks" rel="nofollow noreferrer">Fast Action Links</a> extension also provides a framework for adding links; you can either use it directly if it makes sense, or use it as an example of how to inject links to search results.</p>
  
  <p><a href="https://i.sstatic.net/NRRga.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NRRga.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-22T16:17:35.510Z
Answers.Text: No, I mean the top dropdown action. Here is what i mean. https://ctrlv.cz/WDTp
  And I have custom_templates, so it will not be overwritten. :) But i go to look to hook_civicrm_links. Thank you. :)
Answers.UserDisplayName: Vítek Maňásek
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-22T21:06:08.010Z
Answers.Text: Those are "search tasks", and "export" and "show on map" should already be present.  But you can add new search tasks with [hook_civicrm_searchTasks](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_searchTasks).  Also note that maintaining custom templates creates a lot of maintenance work.  You have to compare your changes against new templates on every upgrade and migrate your changes - hooks are much less work to maintain!
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-21T16:45:27.483Z
Answers.LastActivityDate: 2019-01-21T16:45:27.483Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I´m trying create buttons in ResultTasks.tpl for "show on map" and "export". This actions are in dropdown list with select named "task". I first tried duplicate the select, but it worked only last select, the first select redirect only to print page. Is possible to make separate buttons for these actions?</p>
  
Tags: <contacts><search-results><custom-templates><button>
Title: Create buttons on action from ResultTasks
ThreadText: # Create buttons on action from ResultTasks
  
  (Asked by: username_0 on 2019-01-19)
  
  I´m trying create buttons in ResultTasks.tpl for "show on map" and "export". This actions are in dropdown list with select named "task". I first tried duplicate the select, but it worked only last select, the first select redirect only to print page. Is possible to make separate buttons for these actions?
  
  **Tags:** contacts, search-results, custom-templates, button
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-21. Score: 2
  
  By "buttons", I assume you mean the buttons referenced in the screenshot below.
  
  It's not recommended to edit the .tpl files directly - it's hard to maintain, and will be overwritten any time you upgrade. Instead, it's preferable to use an extension with [hook\_civicrm\_links](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_links/), which allows you to inject your own links.
  
  My [Fast Action Links](https://github.com/MegaphoneJon/com.megaphonetech.fastactionlinks) extension also provides a framework for adding links; you can either use it directly if it makes sense, or use it as an example of how to inject links to search results.
  
  [![enter image description here](https://i.sstatic.net/NRRga.png)](https://i.sstatic.net/NRRga.png)
  
  > **Comments:**
  > **username_0**: No, I mean the top dropdown action. Here is what i mean. https://ctrlv.cz/WDTp And I have custom_templates, so it will not be overwritten. :) But i go to look to hook_civicrm_links. Thank you. :)  
  > **username_1**: Those are "search tasks", and "export" and "show on map" should already be present.  But you can add new search tasks with [hook_civicrm_searchTasks](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_searchTasks).  Also note that maintaining custom templates creates a lot of maintenance work.  You have to compare your changes against new templates on every upgrade and migrate your changes - hooks are much less work to maintain!  
  
  ---
  
  