This is a followup to my question, "How can I have two different urls for the same page that load two different templates?"
Assuming I implement Milo's answer (registering a new rewrite endpoint, load a different template if endpoint is present), how can I then have links within the page rewritten on the fly to include the endpoint (e.g. app-view).
The page the initial endpoint would be added to is: https://liquidchurch.com/messages/
Based on Milo's instructions using the rewrite endpoint and page template filter, the url I'd pass from the mobile app would be: https://liquidchurch.com/messages/app-view/
Now on this page say I click on one of the series, e.g.:
https://liquidchurch.com/sermon-series/divine-direction/
Problem is this will load with the regular template, not the template created particularly for the mobile view. So somehow I have to pass on to this page that it should be displayed in app-view. So the actual URL the individual should be redirected to would be:
https://liquidchurch.com/sermon-series/divine-direction/app-view/
In what way could one accomplish this? Thanks!