This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void Install(SiteInitializer initializer) | |
{ | |
#region Install Toolbox Widgets | |
// get section from toolbox | |
var config = initializer.Context.GetConfig<ToolboxesConfig>(); | |
var pageControls = config.Toolboxes["PageControls"]; | |
var section = pageControls | |
.Sections | |
.Where<ToolboxSection>(e => e.Name == ToolboxesConfig.ContentToolboxSectionName) // Or other section eg: "NavigationControlsSection" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Custom Sitefinity Taxonomy Control to display taxonomy items for a specific Blog | |
/// </summary> | |
public class BlogTaxonomyControl : TaxonomyControl | |
{ | |
public Guid ParentBlogID { get; set; } | |
/// <summary> | |
/// Raises the <see cref="E:System.Web.UI.Control.Load"/> event. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var control = new NewsView(); | |
var pageControl = pageManager.CreateControl<PageControl>(control, placeHolder); | |
pageNode.Page.Controls.Add(pageControl); | |
pageManager.SaveChanges(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var api = App.WorkWith()) | |
{ | |
var pages = api.Pages().LocatedIn(PageLocation.Frontend).ThatArePublished() | |
.ForEach(page => | |
{ | |
page.Extension = null; | |
}).SaveChanges(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Country.DataSource = Config.Get<EcommerceConfig>().Countries.Values.Where(x => x.CountryIsActive == true).ToList().OrderBy(x => x.Name); | |
Country.DataTextField = "Name"; // other properties: IsoCode, Culture, CurrencyName, CurrencyIsoCode, CurrencyIsoNumericCode | |
Country.DataValueField = "Name"; | |
Country.DataBind(); |
NewerOlder