dev-master
9999999-dev https://it.cornell.edu/custom-webA Drupal 8 module to display Localist events in a block
GPL-2.0-or-later
by Anthony Adinolfi
A Drupal 8 module to display Localist events in a block
rename your branch to main, (*1)
git branch -m master main git fetch origin git branch -u origin/main main git remote set-head origin -a
A light weight Drupal module to pull localist and render in a cwd_events block. With six options for built in views., (*3)
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system., (*4)
This module is made for use with a Drupal websites. Development requires Node and NPM., (*5)
with composer, (*6)
composer require cubear/cwd_events
or download directly from Github Repo., (*7)
cd modules/custom && git clone https://github.com/CU-CommunityApps/CD_cwd_events
Development to compile sass and javascript., (*8)
cd ./src/app npm install npm run watch
start a local server in the /dev folder using http-server, (*9)
npm install -global http-server
then run, (*10)
npm run test
check for test coverage:, (*11)
npm run coverage
view browser tests Demo Page, (*12)
Test are loocated in the dev/test folder and test for:, (*13)
all helper functions, (*14)
button click events are not currently tested and must be done manually using the demo page., (*15)
This module follows drupal code standards for phpcs and linting., (*16)
.eslintrc.json
file for linting details.production builds npm prod
require all linting tests to pass before the build can finish with success., (*17)
enable the module with drush, (*18)
drush en cwd_events
add a Events block and configure block settings., (*19)
This is an example of the block output:, (*20)
<section> <h2>Block Name</h2> <a class="cwd_events_readmore" href="/events">Read More</a> <div id="events-listing-UUID" class="drupal-events-listing cwd-events-style" data-target="standard" data-depts="0" data-entries="4" data-format="standard" data-group="0" data-keyword="Sustainability" data-heading="Test" data-calendarurl= "../test/testData.json" data-apikey= 'KLhy2GtuSAGirYGY' data-filterby= 'group' data-addcal= "true" data-pagination="true" ></div> </section>
drush en graphql drush en graphql_core
Set the Graphql permissions for anonymous users., (*21)
[x] Bypass field security (optional), (*22)
[x] Execute arbitrary GraphQL requests, (*23)
[x] Execute persisted GraphQL requests, (*24)
The localist api docs https://developer.localist.com/doc/api#usage, (*25)
READ the API DOCS! In many cases just play around with the demo, until you get the results you need., (*26)
The module builds a query that is made to to the localist api, (*27)
The localist api returns results with the three parameters Anded together:, (*28)
Departments are (OR) keywords (AND) Group_id (integer), (*29)
Currently the Drupal module does not support multiple keywords. The API does support multiple keywords but they would be ORed together and in most cases the resulting query is very small. If you have a project that requires multiple keywords put in a issue for it., (*30)
For the versions available, see the tags on this repository., (*31)
See also the list of contributors who participated in this project., (*32)
This project is licensed under the GNU General Public License v2.0 - see the LICENSE.md file for details, (*33)
A Drupal 8 module to display Localist events in a block
GPL-2.0-or-later