Reset a count in a different function javascript (JS) and some Jquery

I have a quiz that allows to user to take the quiz 3 times and if they don't pass on the third time, they don't get a certificate at the end of the course.
The counts reset when the user passes the quiz.


//Counts the clicks

Leaving site JS Lightbox Alert- exclude specific URLS as a condition



If the URL contains "volleyball' in it, the leaving site lightbox warning does not come up and the user is redirected to the site.

Bad Gateway Error- Power Automate SFTP AWS S3 Buckets

If you are trying to using Power Automate and following "I Am Lu" s Tutorial and you get a Bad Gateway error in your power automate. The Key was not made correctly. I am not sure if it is because I am on a Mac and Lu is on a Windows but if you want the flow to connect to AWS then run the below command in your terminal to get the correct SSH Key.

ssh-keygen -m PEM

The key should start with:



Condition when added a admin token flow Power Automate- Power Platform Connectors- O365 Management API - 401

To add the condition for the Admin token flow here>

Condition Basic Edit does not exist anymore for you would do this instead.

In the first condition field put an expression containing:

@or(equals(items('Apply_to_each_2')['Operation'], 'CreateFlow'),equals(items('Apply_to_each_2')['Operation'], 'EditFlow'))

in the second field put in an expression containing:

Adding Google Tag Manager Datalayer elements for Drupal 9 webform

1. First copy and paste the confirmation twig template for webforms in the webforms module.

Then add a div to the twig template like this.

<div id="learning-objective-data">  </div>

In the div place your webform submission data token for the field you would like to grab

{{ Webform Field }} 

So it looks like this:

<div id="learning-objective-data">
{{ }} 


Twig Trim Body Summary for templates Code

<div class="summary">
 {% set text = content.body['#object'].body.summary|render %}
{{ text|length > 80 ? text|slice(0, 80)|raw ~ '...' : text|raw }}
{% set text = content.body['#object'].body.summary|render|striptags %}
{{ text|length > 80 ? text|slice(0, 80) ~ '...' : text }}

ColorBox, Paragraphs, Media Types and fun stuff.

Recreating the process that's on our site.

 Create Media type for the Colorbox image.
 a. Add media type
b. I named mine Lightbox image
c. Media Source
d. Media source configuration = -Create - 
e. Field mapping- I only used "Name" as "Name"
f. Publish options = "Published" is ticked
g. Click the sprocket and change the image size to what suits you
h. sAve

Re-direct rule to make edit display form save and stay on itself and not go to /node/nid


When content is updated



Text comparison

Data selector:  @rules.current_path_context:current_path.path

Operator: contains

Matching text (direct input mode) : /yourdisplaypath.  (For instance, mine was /steps)



Subscribe to RSS - blogs