This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <style> | |
This file contains hidden or 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
| if (bodyText.InvariantContains(product.Name)) | |
| { | |
| if (relationService.AreRelated(doc, product, "product") == false) | |
| { | |
| relationService.Relate(doc, product, "product"); | |
| } | |
| } | |
| else | |
| { | |
| if (relationService.AreRelated(doc, product, "product") == true) |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <system.net> | |
| <mailSettings> | |
| <smtp deliveryMethod="SpecifiedPickupDirectory"> | |
| <specifiedPickupDirectory pickupDirectoryLocation="C:\Temp\Mail\" /> | |
| </smtp> | |
| </mailSettings> | |
| </system.net> | |
| </configuration> |
This file contains hidden or 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
| protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
| { | |
| TreeControllerBase.TreeNodesRendering += TreeControllerBase_TreeNodesRendering; | |
| } | |
| private void TreeControllerBase_TreeNodesRendering(TreeControllerBase sender, TreeNodesRenderingEventArgs e) | |
| { | |
| if (sender.TreeAlias == "content") | |
| { | |
| var shared = e.Nodes?.Where(x => x.Name == "Shared").FirstOrDefault(); |
This file contains hidden or 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
| ISearchResults Search(string term, string limit) | |
| { | |
| var terms = new List<IExamineValue>(); | |
| if (term.Contains(" ")) | |
| { | |
| foreach (var t in term.Trim().Split(' ')) | |
| { | |
| terms.Add(t.MultipleCharacterWildcard()); | |
| terms.Add(t.SingleCharacterWildcard()); |
This file contains hidden or 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
| <add name="TownIndexer" | |
| type="Examine.LuceneEngine.Providers.SimpleDataIndexer, Examine" | |
| indexSet="ukTownsIndexSet" | |
| dataService="SearchCourse.Core.Indexer.DbIndexer, SearchCourse.Core" | |
| analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" | |
| indexTypes="ukTown" | |
| runAsync="true" /> |
This file contains hidden or 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
| <IndexSet SetName="ukTownsIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/uktowns/"> | |
| <IndexUserFields> | |
| <add Name="name" EnableSorting="true"/> | |
| <add Name="county" EnableSorting="true"/> | |
| <add Name="country"/> | |
| <add Name="grid_reference" /> | |
| <add Name="latitude" /> | |
| <add Name="longitude"/> | |
| <add Name="postcode_sector"/> | |
| </IndexUserFields> |
This file contains hidden or 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 TextPageController : RenderMvcController | |
| { | |
| private readonly IExamineManager _examineManager; | |
| public TextPageController(IExamineManager examineManager) | |
| { | |
| _examineManager = examineManager; | |
| } | |
| public ActionResult TextPage(ContentModel model) |
This file contains hidden or 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 System.Web.Mvc; | |
| using Umbraco.Core; | |
| using Umbraco.Core.Composing; | |
| using Umbraco.Core.Models.PublishedContent; | |
| using Umbraco.Web.Models; | |
| using Umbraco.Web.Mvc; | |
| namespace UmbracoDI | |
| { | |
| public class MyComposer : IComposer |
This file contains hidden or 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 System.Linq; | |
| using Umbraco.Core; | |
| using Umbraco.Core.Composing; | |
| using Umbraco.Core.Events; | |
| using Umbraco.Core.Logging; | |
| using Umbraco.Core.Services; | |
| using Umbraco.Core.Services.Implement; | |
| namespace MvcCourse.Core | |
| { |