Skip to main content
Support Help Center Help Center home page
AI OnAI Off
Developer documentation Developer community Optimizely Academy Submit a request Sign in
  1. Support Help Center
  2. Optimizely support
  3. API

Loop Through Languages of a Page

  • October 03, 2017 16:33

Description

Below is a code sample of how to loop through language versions of a page.

Resolution

foreach (var pageLanguage in pageTypeData.ExistingLanguages)
{
    var repository = ServiceLocator.Current.GetInstance<IContentLoader>();
    var test1 = repository.Get<PageData>(pageTypeData.ContentGuid, pageLanguage);
}

Please sign in to leave a comment.

Articles in this section

  • Dynamic Data Store Remap EPiServer.Core.PageObject
  • Deleting old content versions using the API
  • Enable special characters in URL Segment
  • How to stop a custom job in Admin UI in case your job has a loop.
  • How to remove/hide media and email options when creating hyperlink popup in CMS
  • Expanding Nested Block for Content Delivery API v3 (CMS 12)
  • 401 Error when using REST API/ ContentDelivery API in multi instance environment
  • How to setup Content Delivery API with Entra ID (formerly Azure AD) and OpenIDConnect
  • Simple sample on how to use interfaces and allowed types on cms 12
  • How to translate an internal url to external url

See all 39 articles

Optimizely Website Support Policy Privacy Notice Website terms of use Cookie settings Trust center Third-Party Addons & Platforms
Deutsch