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
//model | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace StoreHours.Models | |
{ | |
public class StoreHoursModel |
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
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ArchetypeFieldsetModel> | |
@using TableEditor.Models; | |
@using Archetype.Models; | |
@{ | |
if (Model == null) | |
{ | |
return; | |
} | |
var tableModel = Model.GetValue<TableEditorModel>("table"); |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using Umbraco.Core.Logging; | |
using Umbraco.Web.WebApi; | |
using SomeNS.Umbraco.Extensions.Models; |
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
var myArchetype = new ArchetypeModel() | |
{ | |
Fieldsets = new List<ArchetypeFieldsetModel>() | |
{ | |
new ArchetypeFieldsetModel() | |
{ | |
Alias = "fs1", | |
Properties = new List<ArchetypePropertyModel>() | |
{ | |
new ArchetypePropertyModel() |
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 static IHtmlString TransformGlossaryTerms(this string input, ControllerContext context) | |
{ | |
if (String.IsNullOrWhiteSpace(input)) | |
{ | |
return new HtmlString(input); | |
} | |
var glossaryTerms = new List<string>(); | |
foreach (var term in NodeHelper.Instance.Glossary.Descendants("GlossaryTerm")) |
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
.archetypeEditor .archetypeProperty { | |
clear: none; | |
} | |
.archetypeEditor textarea { | |
min-width: auto; | |
width: auto; | |
} | |
.row8-4 .firstColumn { |
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 Newtonsoft.Json; | |
@using Archetype.Models; | |
var myArchetype = JsonConvert.DeserializeObject<ArchetypeModel>(luceneResult.Fields[field]);//this has to be pure Archetype JSON | |
var firstFieldset = myArchetype.Fieldsets.FirstOrDefault();//assuming it's always one fieldset or less | |
if (firstFieldset != null) | |
{ | |
<div> |
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
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@using Archetype.Models | |
@using Archetype.Extensions | |
@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@ | |
@if (CurrentPage.Children.Where("Visible").Any()) | |
{ | |
@* For each child page under the root node, where the property umbracoNaviHide is not True *@ | |
foreach (var childPage in Model.Content.Children.Where("Visible")) |
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
//Register some JS with Umbraco | |
//~/App_Plugins/ArchetypeLabelTemplates/package.manifest | |
{ | |
"javascript": [ | |
"~/App_Plugins/ArchetypeLabelTemplates/urlpicker.js" | |
] | |
} | |
//Define your label code here | |
//~/App_Plugins/ArchetypeLabelTemplates/urlpicker.js |
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
[HttpPost] | |
public object MyMethod(List<string> ids) | |
{ | |
} |