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
import Speak = require("sitecore/shell/client/Speak/Assets/lib/core/1.2/SitecoreSpeak"); | |
class PageCode extends Speak.PageCode { | |
initialize() { | |
} | |
} | |
Sitecore.Speak.pageCode(["bootstrap", "scPipeline"], new PageCode()); |
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 void BindDatasourceToSitecoreControls() | |
{ | |
BindDatasourceToSitecoreControls(DataSourceItem); | |
} | |
public void BindDatasourceToSitecoreControls(Item dataSource) | |
{ | |
if (Controls.Count > 0) | |
{ | |
BindControls(this.Controls, dataSource); |
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
Sitecore.Context.Item.Paths.IsContentItem |
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
Sitecore.Data.Items.ItemUtil.AddFromTemplate(string itemName, string templatePath, Item parent); |
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 (new EditContext(scItem)) | |
{ | |
redirectItem.Fields["fieldName"].Value = ""; | |
} |
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 item = Sitecore.Events.Event.ExtractParameter<Item>(args, 0); |
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 interface ICustomRepositoryActions<T> : Sitecore.Services.Core.IRepository<T> where T : IEntityIdentity | |
{ | |
string DoSometingCustom(); | |
} |
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 EntityRespository :ICustomRepositoryActions<Entity> | |
{ | |
public IQueryable<Entity> GetAll() | |
{ | |
throw new NotImplementedException(); | |
} | |
public Entity FindById(string id) | |
{ | |
throw new NotImplementedException(); |
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
[ServicesController] | |
public class EntityController : EntityService<Entity> | |
{ | |
private ICustomRepositoryActions<Entity> _customRepositoryActions; | |
public EntityController(ICustomRepositoryActions<Entity> repository) | |
: base(repository) | |
{ | |
_customRepositoryActions = repository; | |
} |
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
[HttpGet] | |
[ActionName("DoSomethingCustom")] | |
public string Get() | |
{ | |
return "Hello World"; | |
} |