1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Only run widget code on fronend

Only run widget code on fronend

2 posts, 1 answered
  1. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    02 Apr 2012
    Link to this post
    Is there a way to only run widget code on the front end and to not run it when editing the page. I have a widget that adds controls to the page and I don't want it to do that when the user is editing the page.
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    02 Apr 2012
    Link to this post
    Hi Erik, you can detect if a page is in design/preview mode via code to prevent execution. Take a look at this post: How to Detect Design View

    hope this is helpful!
    Answered
2 posts, 1 answered