Kentico 7 hide editable text if it's empty

后端 未结 2 1358
青春惊慌失措
青春惊慌失措 2021-01-13 14:42

I have an editable text web part on a page template. It has a custom HTML envelope before and after the text. How can I hide the whole thing, envelope included, if the edi

2条回答
  •  离开以前
    2021-01-13 15:19

    Try this as the "Visible" property:

    {% (ViewMode != "LiveSite") || (CMSContext.CurrentDocument.editabletext != "") #%}
    

    Change "editabletext" to whatever you have for your web part control ID.

提交回复
热议问题