GithubHelp home page GithubHelp logo

kcristiano / civicrm-search-kit-block Goto Github PK

View Code? Open in Web Editor NEW

This project forked from agileware/civicrm-search-kit-block

0.0 2.0 0.0 399 KB

JavaScript 36.90% PHP 55.71% Smarty 1.41% SCSS 5.98%

civicrm-search-kit-block's Introduction

CiviCRM Search Kit Block

Requirements:

  • CiviCRM 5.x with Search Kit
  • Gutenberg editor enabled

This plugin provides a Gutenberg block for displaying a CiviCRM Search kit display to front end users. It will display fields and columns as configured in your Search Kit Display using customizable templates. This could be useful for creating directories or other public listings of any CiviCRM data you can get at with the api v4.

Usage

  1. Install and Enable the plugin and requirements
  2. Configure a CiviCRM Search Kit Search (CiviCRM > Search > Search Kit) and save it Search Kit Config
  3. Add or Edit a Post or Page with the Gutenberg editor. When you "Add a Block", the option for a "civicrm-search-kit" block will be available Choose Block
  4. Configure the Block in the right-hand column under "CiviCRM Search Display Options". You'll choose the search to display, the display template, and whether to check if the front-end viewer has permission to access the data displayed. Gutenberg Block

Front End Block

Customizing Displays

Displays are rendered with html partials in the plugin under /templates. The plugin will search any folder under /templates for display template options, so you can extend these to add whatever html, classes, etc you need for a nice display.

Common Issues

  • Block displays "Invalid Parameters": Display ID may no longer be valid, template directory chosen may not exist or permissions are incorrect
  • Block displays Nothing: Check if you are checking permissions, check if the CiviCRM Search Kit search actually comes up with results

Development Notes

Development kit left in for easy debugging and/or extension of features.

This project was bootstrapped with Create Guten Block.

Below you will find some information on how to run scripts.

You can find the most recent version of this guide here.

๐Ÿ‘‰ npm start

  • Use to compile and run the block in development mode.
  • Watches for any changes and reports back any errors in your code.

๐Ÿ‘‰ npm run build

  • Use to build production code for your block inside dist folder.
  • Runs once and reports back the gzip file sizes of the produced code.

๐Ÿ‘‰ npm run eject

  • Use to eject your plugin out of create-guten-block.
  • Provides all the configurations so you can customize the project as you want.
  • It's a one-way street, eject and you have to maintain everything yourself.
  • You don't normally have to eject a project because by ejecting you lose the connection with create-guten-block and from there onwards you have to update and maintain all the dependencies on your own.

Feel free to tweet and say ๐Ÿ‘‹ at me @MrAhmadAwais

npm npm license Tweet for help GitHub stars GitHub followers

civicrm-search-kit-block's People

Contributors

elisseck avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.