• How to add a media item via the API

    This sample illustrates how to add a media block type to the CMS. This assumes you have a Article page type but really you just need to pass in a ContentLink to the location you want to save the file to.  Resolution Below are some sample methods to add a new blob and insert data into it.  //article is a page type (used to get the content link) public string AddFile(Article article, HtmlFile file) { string url = ""; try { var conte...

  • Find UnifiedSearch() Sample Template

    DescriptionThis is a sample template that uses Find and UnifiedSearch() to return the results.ResolutionCode Download To use, unzip into the site root and browse to the page.http://mysite.com/UnifiedSearchTest.aspx?query=alloy This was tested on Alloy 10.x.

  • How to get all languages tied to a fallback language

    This article contains the code segment that can retrieve all languages tied to a fallback language configured in the cms. Resolution ContentLanguageSettingsHandler.Instance.Get(ContentReference.StartPage).Where(s => s.LanguageBranchFallback.Contains("de", StringComparer.OrdinalIgnoreCase)).Select(s => s.LanguageBranch); The first parameter in the Contains will be changed to the fallback language of interest.