I am reading article


but I am not sure what they mean by DynamicMasterPageFile and Static Token, and why thye use hardcoded and token reference.

Please explain with example as where these used.

1 Answer 1


I believe you are refering to the Dynamic Token vs. Static Token - of course they are both meant to instruct the page from where to load either of the 2 MasterPages (sytem pages vs. user pages).

The static token is basically always refering to where physically the master page is location (but only in the Context of the CURRENT SITE COLLECTION - cannot refer a master page in another site collection), irelevant of the current Site Settings (these are be changed either via SPD or via the Site Settings > Master for Publsishing Sites), where as the dynamic one simply states to load whatever is found in those settings (these are actually stored in each Web property bag) - usually used by the application pages (those in _layouts) to preserve the consistent look & feel with what has been configured by Site Owner/Administrator.

Imagine situations when you need to build an application page that needs to be integrated in multiple site collections (e.g. application pages are usually stored in _layouts, and accessible across site collections! ) - you will most likely NOT use the Static token, but rather the Dynamic, as each Site Collection might have or not in that respective location the master page, but decide to deploy it elsewhere, or a different path.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.