I want to create a custom dashlet but I don't know how to do that.Please guide me to build a new dashlet. Any github reference or any source. Thanks in advance.

2 Answers 2


Start with civix generate:page. Optionally assign some smarty variables in run() in the autogenerated php class and edit the autogenerated .tpl with your html.

Then you need to insert an entry in civicrm_dashboard that links the url you chose in generate:page. See the function addGettingStartedDashlet() in CRM/Upgrade/Incremental/php/FourSeven.php, just note the columns have changed slightly if you're on a later version.

  • Will you provide a snippet?
    – deepak
    Mar 13, 2019 at 12:24
  • Take a look at CRM/Dashlet/Page/GettingStarted.php. Did you try using civix generate:page? Try it first and then if you have a specific part that isn't working you can ask about that.
    – Demerit
    Mar 13, 2019 at 12:33
  • I created an extension using civix tool. But I don't have any idea about the dashlet.
    – deepak
    Mar 13, 2019 at 12:35

Here is an example dashlet with a search: https://github.com/CiviCooP/org.civicoop.quicksearchdashlet

  • I tried downloading the extension using ./cv ext:download org.civicoop.quicksearchdashlet but it does not show up in the list
    – harshal
    Aug 3, 2020 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.