Only run widget code on fronend

Posted by Community Admin on 04-Aug-2018 19:23

Only run widget code on fronend

All Replies

Posted by Community Admin on 02-Apr-2012 00:00

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.

Posted by Community Admin on 02-Apr-2012 00:00

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!

This thread is closed