I have a custom page-model backed by a huge database where I want to control the content fetched from the database depending on what page/panel-page is requested.
For example, the parent page creates a list of all its children (which can range from a few 100 to a few 1000). Normally it’s content is not loaded unless required. If a panel-page tries to display a list of all its children (bleuprints Pages section). It will load all the content while it only needs their title (and creation date in my case).
I noticed a ‘isActive’ function in the model, which works great for if the requested page (front-end) is the current model-page. But it seems to run false
when this is the case for a panel-view (back-end) of the same page.
So the question is, how to detect if the content of a Page is requested as a panel-view rather than a preview for its parent ‘Pages section’?