Try our conversational search powered by Generative AI!

Check if page is in editmode epi 6

Vote:
 

10:58:41

Hello everybody.

I'm trying to find a way to check if the page is in editor mode to create a trigger. And I have tryed the solutions that I found here. But they won't work. So I'll try to create a new topic.

#177203
Apr 05, 2017 11:06
Vote:
 

I think you could do something like:

bool isInEditMode = page.WorkPageID != 0; 
#177206
Apr 05, 2017 11:37
Vote:
 

I have tryed that and for some reason it's always return id=0.

I'm not logged in as any one,  so that's the part I'm not getting. This should work, have found similer solutions. So I'll keep looking.laughing

#177211
Apr 05, 2017 12:37
Vote:
 

Perhaps this works then

#177212
Apr 05, 2017 12:48
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.