[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: MVC Template: only include resources if not in edit mode

  • Thread starter Thread starter KEITHP@mosers.org
  • Start date Start date
Status
Not open for further replies.
K

KEITHP@mosers.org

Guest
Hello bwilson, I am relatively new to Sitefinity development also, but I think I can help you out here. In your razor html template, wrap the script code you wish to include with something like this: @if (!SystemManager.IsDesignMode) { } This will only render the html inside of this conditional statement when the page is not in design mode. There are other "Is[ ]Mode" types you may also want to include, such as IsInlineEditingMode, and IsPreviewMode. You will have to decide on that for yourself. Side note: This will require @using Telerik.Sitefinity.Services; at the top of your template code. Hope this helps.

Continue reading...
 
Status
Not open for further replies.
Back
Top