Programmatically determine if viewing/editing page type defaults.

Permalink 1 user found helpful
Hello all,
I was wondering if there is a way to determine if the page type defaults view was currently active.

Here's my problem:
I have a custom theme that has a recursive function to find the first parent with an certain attribute. This function times out when page type defaults are being set (impossible to set page type defaults).

I need a way to tell my theme to disable this recursive function when the defaults are being viewed or edited. I was hoping there was an API call, but can't find one.

I narrowed it down to the task="load_master" but still can't find what I need.

Any help would be appreciated.

glockops
 
Mainio replied on at Permalink Best Answer Reply
Mainio
Well at least I can say that this issue is pretty badly documented/commented. I've usually done just some kind of workaround for the problem.

However, when I now look the page defaults in edit mode, I could find that this might help:
if (!$c->isMasterCollection()) {
   // TODO: This is NOT a page type defaults section
}


Antti / Mainio

EDIT: But just check out if it works out, I'm not sure...
glockops replied on at Permalink Reply
glockops
Thanks! I was just about to post that I found you can match the CollectionID to the MasterCollectionID.