View MyController.cs
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 System.Web.Mvc; | |
using Umbraco.Web.Models; | |
using Umbraco.Web; | |
using Umbraco.Core.Xml; | |
using Umbraco.Web.Mvc; | |
namespace MyWebsite.Controllers | |
{ | |
public class MyController : RenderMvcController | |
{ |
View nexu-dash.cs
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Web.Http; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
using Umbraco.Web; | |
using Umbraco.Web.WebApi; |
View update examine fields.cs
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 index = (LuceneIndex)ExamineManager.Instance.Indexes.Where(f => f.Name == "ExternalIndex").FirstOrDefault(); | |
// Get the IndexWriter | |
var writer = index.GetIndexWriter(); | |
var searcher = (BaseLuceneSearcher)index.GetSearcher(); | |
// perform search to get the doc from the index based on node id | |
Term term = new Term("id", "1082"); // Term to get node by id | |
var q = new TermQuery(term); |
View DefaultController.cs
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 DefaultController : RenderMvcController | |
{ | |
[UmbracoDonutOutputCache(CacheProfile = "LongPageCache", | |
Options = OutputCacheOptions.NoCacheLookupForPosts & | |
OutputCacheOptions.ReplaceDonutsInChildActions, Order = 100)] | |
public override ActionResult Index(RenderModel model) | |
{ | |
return base.Index(model); | |
} | |
} |
View MediaExportController.cs
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 System; | |
using System.IO; | |
using System.Web.Hosting; | |
using Umbraco.Core; | |
using Umbraco.Core.Logging; | |
using Umbraco.Core.Models; | |
using Umbraco.Web; | |
using Umbraco.Web.WebApi; | |
/// <summary> |