Try our conversational search powered by Generative AI!

Page Load Event

Vote:
 

Hello! I need to add code to a page load event or something similar but only in edit mode. Is there any way to do this without adding it to every single controller on the site. And I just want to render it to the CMS and not save it to the database. 

Thanks. 

#183648
Oct 19, 2017 1:01
Vote:
 

Which version of Epi are you running?

#183651
Oct 19, 2017 8:47
Vote:
 

Hey, Scott,

Do you have a IPageViewModel - or a similar design to AlloyTech templates? You could have something similar with PageContextActionFilter where you can change the Model before it gets to the View (see OnResultExecuting in AlloyTech for inspiration). There, you could check PageEditing.PageIsInEditMode and set the value to something or null based on that.

Or have I misunderstood your intention?

BR,
Marija

#183772
Oct 23, 2017 9:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.