Blog, Website & Page Publishing

matttunney
トップ投稿者

hubl condition when editing content

解決

Hi -

Is there a variable or function that I can call to prevent some scripts from running when a content editor is either editing or previewing a blog post or landing page.

 

Thanks

Matt

0 いいね!
1件の承認済みベストアンサー
tjoyce
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

hubl condition when editing content

解決

@matttunney - 

{% if request.domain == 'preview.hs-sites.com' %}
    //the content editor is previewing the post       
{% else %}
    //the content editor is editing the post
{% endif %}

If this answer helped, please, mark as solved 😄


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.

元の投稿で解決策を見る

1件の返信
tjoyce
解決策
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

hubl condition when editing content

解決

@matttunney - 

{% if request.domain == 'preview.hs-sites.com' %}
    //the content editor is previewing the post       
{% else %}
    //the content editor is editing the post
{% endif %}

If this answer helped, please, mark as solved 😄


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.