Skip to content

Support for disabling page type synchronization through a file #15

Open
wants to merge 1 commit into from

1 participant

@cjberg
cjberg commented Mar 30, 2012

I've added support for disabling page type synchronization through the existence of a file. The file is configured through a new attribute in PTB's configuration section: disablePageTypeUpdationFile.

It's useful in e.g. an EPiServer Enterprise scenario, where multiple sites share the same code and database. Only the first web site needs to synchronize page types, and once that's been done, the deploy script can create a file to prevent further synchronization.

One could of course have achieved the same thing by using configSource to put the Page Type Builder configuration section in a separate file, and then change the original attribute (a separate file is important for not restarting the already started first site, like you would by changing web.config). I just felt this alternative method was better because:

  • source-control versioned files needn't be changed, and
  • it was a little bit easier to implement in our deployment scripts.

While I was at it, I also introduced disablePageTypeSync and disablePageTypeSyncFile as synonyms of the Updation attributes, since I can't seem to remember "Updation" whenever I need it.

I added to already existing unit tests, instead of writing new specs. IMHO, low-level stuff like this is better expressed using unit tests anyway. It’s also fully backward compatible.

@cjberg cjberg Added support for disabling page type synchronization through the exi…
…stence of a file.

The file is configured through a new attribute in PTB's configuration section: disablePageTypeUpdationFile.
Also introduced disablePageTypeSync and disablePageTypeSyncFile as synonyms of the Updation attributes.
b824d05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.