The new content webhook

Back 2019-06-01 16:34:37
This new feature enables you to reduce traffic for mostly constant contents on your page.

We added a new type of content, the so called "WEBHOOK_CONTENT". You can create classes of this type for content that contains data of your page which has not to be dynamically each time the page reloads but has to be editable for the user. This new concept allows you to create exactly one instance of this object. This type of content is very effective for page informations like :

  • logo
  • informations available on each page
  • other content in the footer or in the header

Whenever changes occur concerning this object a webhook will be executed which informs your scripts that you need to download the new version.

webhook - pic

The url which will be used to address your scripts is editable in the administration -> settings -> webhooks - section. There you see that the id and the corresponding language will be sent via GET.

To show the use of this concept imagine the following scenario.

You have created a homepage which contains a short about - us intro on each page. You want this section to be editable. Lets image the content has the name "short_intro". Then you have to read the content via api each time the page is reloaded. To overcome this behavior you can use the Webhook_content. You can create a object which contains all this kind of content, so the short_intro text is also stored in this object.

Then you have a script - entry - point which is named: your-domain/read_content

Whenever the link is visited your script reads the webhook_object and writes the needed contents into static html - files which are included in your page. Whenever the page is loaded the static content is read out of the static html - files. When a change occurs your script is trigged an the static content will be refreshed.

Try sleekshop 30 days for free.

Start now