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
BlogsManager blogMgr = null; | |
NewsManager newsMgr = null; | |
EventsManager evMgr = null; | |
// retrieve the System Configuration | |
var systemConfig = Config.Get<SystemConfig>(); | |
// blogs | |
var blogModuleConfig = systemConfig.ApplicationModules[BlogsModule.ModuleName]; | |
if (blogModuleConfig.StartupType != StartupType.Disabled) |
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 providerName = "MyCustomProviderName"; | |
using (var api = App.Prepare().SetContentProvider(providerName).WorkWith()) | |
{ | |
// do stuff with api | |
} |
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
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddToCartWidget.ascx.cs" Inherits="SitefinityWebApp.Templates.AddToCartWidget" %> | |
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %> | |
<asp:UpdatePanel ID="UpdatePanel" runat="server"> | |
<ContentTemplate> | |
<sf:Message runat="server" ID="addedToCartMessage" CssClass="sfMessage sfTopMsg" | |
RemoveAfter="10000" /> | |
</ContentTemplate> | |
</asp:UpdatePanel> | |
<asp:Label ID="quantityLabel" runat="server" Text='<%$Resources:OrdersResources, QuantityColon %>' | |
AssociatedControlID="quantity" CssClass="sfTxtLbl" /> |
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 class HideableContentBlock : ContentBlock | |
{ | |
protected override void Render(System.Web.UI.HtmlTextWriter writer) | |
{ | |
// always render in page editor | |
if (this.IsDesignMode() || this.IsPreviewMode()) | |
{ | |
base.Render(writer); | |
return; | |
} |
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
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %> | |
<sf:ResourceLinks ID="resourcesLinks" runat="server"> | |
<sf:ResourceFile JavaScriptLibrary="JQuery" /> | |
<sf:ResourceFile JavaScriptLibrary="MooTools" /> | |
<sf:ResourceFile JavaScriptLibrary="Prototype" /> | |
<sf:ResourceFile Name="~/Widgets/myJavascript.js" /> | |
</sf:ResourceLinks> |
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> | |
/// A simple field for displaying related dynamic content items in a drop-down menu. | |
/// Requirements: | |
/// * the name of the field must exactly match the name of the content type being displayed | |
/// * the content type must be within the same module as the content type using this field | |
/// </summary> | |
public class DynamicContentSelectorField : ChoiceField | |
{ | |
/// <summary> | |
/// Defaults the rendering of the list as a drop-down menu |
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 string GetPageUrl(Guid PageID) | |
{ | |
var mgr = PageManager.GetManager(); | |
var pageNode = mgr.GetPageNode(PageID); | |
return pageNode.GetFullUrl(); | |
} |
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 bag = new Dictionary<string, string>(); | |
bag.Add("ContentType", FULL_NAME_OF_CONTENT_TYPE); | |
WorkflowManager.MessageWorkflow(dynamicContentItem.Id, dynamicContentType, null, "Publish", false, bag); |
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 ctrl = pageManager.CreateControl<PageControl>("~/Path/To/Control.ascx", "ContentPlaceholderName"); | |
pageManager.SetControlDefaultPermissions(control); | |
pageData.Controls.Add(control); |
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
<%@ Register TagPrefix="sitefinity" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" %> | |
<sitefinity:ResourceLinks ID="ResourceLinks1" runat="server" UseEmbeddedThemes="false"> | |
<sitefinity:ResourceFile Name="~/Path/To/File.css" /> | |
</sitefinity:ResourceLinks> |
NewerOlder