craftcms / webhooks

Plugin for integrating Craft with Zapier and IFTTT.
https://plugins.craftcms.com/webhooks
MIT License
84 stars 12 forks source link

Increase the size of the url column #60

Closed weotch closed 6 months ago

weotch commented 2 years ago

Description

This increases the size of the url column so complex twig code can be stored in like:

{% if event.sender.site.handle == "prod" %}
    https://api.netlify.com/build_hooks/xxxxxx
{% elseif event.sender.site.handle == "en_CA" %}
    https://api.netlify.com/build_hooks/yyyyyy
{% elseif event.sender.site.handle == "fr_CA" %}
    https://api.netlify.com/build_hooks/zzzzzzz
{% endif %}

Related issues

brandonkelly commented 6 months ago

I think it probably makes more sense to store that logic in a separate template file, and include it from the URL field using an {% include %} tag.