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 ICustomRepository<T> : Sitecore.Services.Core.IRepository<T> where T : IEntityIdentity | |
{ | |
List<Entity> GetAll(int pageSize, int page); | |
} |
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 : ICustomRepository<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 ICustomRepository<Entity> _customRepository; | |
public EntityController(ICustomRepository<Entity> repository) | |
: base(repository) | |
{ | |
_customRepository = 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
<div class="sc-tile-default" > | |
<div class="sc-tile-default-property"> | |
<span class="sc-tile-property-title" >Database: </span><span class="sc-tile-property-value" data-bind="text: $database"></span> | |
</div> | |
<div class="sc-tile-default-property"> | |
<span class="sc-tile-property-title" >DisplayName: </span><span class="sc-tile-property-value" data-bind="text: $displayName"></span> | |
</div> | |
<div class="sc-tile-default-property"> | |
<span class="sc-tile-property-title" >Path: </span><span class="sc-tile-property-value" data-bind="text: $path, attr: {title: $path}"></span> | |
</div> |
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
namespace MikeRobbins.WallpaperManager.Models | |
{ | |
public class Wallpaper : Sitecore.Services.Core.Model.EntityIdentity | |
{ | |
public string itemId { get; set; } | |
public string Path { get; set; } | |
public string Name { get; set; } | |
} | |
} |
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
<img width="112" data-bind="attr: {src: Path}" /> |
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
<span data-bind="text: Name"></span> |
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
<div class="sc-tile-default" data-bind="attr: {id: Id}"> | |
<div style="min-height: 98px;"> | |
<img width="112" data-bind="attr: {src: Path}" /> | |
</div> | |
<div class="sc-iconList-item-title"> | |
<span data-bind="text: Name"></span> | |
</div> | |
</div> |
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
namespace MikeRobbins.Business | |
{ | |
public class Searcher : ISearcher | |
{ | |
public List<SiteSearchResultItem> GetItemsByBaseTemplate(string indexName, ID baseTemplateId, string[] keywords) | |
{ | |
using (var context = Sitecore.ContentSearch.ContentSearchManager.GetIndex(indexName).CreateSearchContext()) | |
{ | |
var culture = Sitecore.Context.Language.CultureInfo; |
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
<analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.PerExecutionContextAnalyzer, Sitecore.ContentSearch.LuceneProvider"> | |
<param desc="defaultAnalyzer" type="Sitecore.ContentSearch.LuceneProvider.Analyzers.DefaultPerFieldAnalyzer, Sitecore.ContentSearch.LuceneProvider"> | |
<param desc="defaultAnalyzer" type="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"> | |
<!-- To run a different version of Lucene, change the version. | |
Usage: If a problem is found in the latest version to Lucene and a previous version is more stable, you can change the version | |
attribute and run in the version that is stable e.g. Lucene_29 or Lucene_23. | |
--> | |
<param hint="version">Lucene_30</param> | |
</param> | |
</param> |