Hello,
Other than checking the actual URL value, the
ViewMode may be the only option. Would it be possible to clarify why that does not work for you? We may be able to find alternative solutions if you could provide more details about the requirement.
Best Regards,
Sandro