Thursday 12 April 2007

Determining the current variation

If you need to find out which variation a client has requested, this code might do the trick.

Start by getting the current VariationLabel; then compare its title against a known variation title.

VariationLabel currentVariation = PublishingWeb.GetPublishingWeb

if (currentVariation != null &&
currentVariation.Title.ToLowerInvariant () ==
//do something

No comments:

Post a Comment

Spam comments will be deleted

Note: only a member of this blog may post a comment.