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.Collections.Generic; | |
using System.Linq; | |
using Umbraco.Community.Contentment.DataEditors; | |
using Umbraco.Core.PropertyEditors; | |
using Umbraco.Web; | |
namespace MyWebsite.DataSources | |
{ | |
public class PropertyDataDataSource : IDataListSource | |
{ |
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
function setEndOfContenteditable(contentEditableElement) | |
{ | |
var range,selection; | |
if(document.createRange)//Firefox, Chrome, Opera, Safari, IE 9+ | |
{ | |
range = document.createRange();//Create a range (a range is a like the selection but invisible) | |
range.selectNodeContents(contentEditableElement);//Select the entire contents of the element with the range | |
range.collapse(false);//collapse the range to the end point. false means collapse to end rather than the start | |
selection = window.getSelection();//get the selection object (allows you to change selection) | |
selection.removeAllRanges();//remove any selections already made |
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
aim is to add UID using the generate-id function to the parent element (Object) and also to descendants so when imported into a database there are primary/foreign keys to knit it all back together again. | |
xslt currently properly assigns UID to Object and children but then assigns a new (but the same) UID to further descendants within each Child block; ie all children of child 1 get UID X, all children of child 2 get UID Y, etc. | |
So nearly there but not quite... | |
Files: | |
Schema (xsd) | |
Transform (xslt) |
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
<root id="-1"> | |
<HomePage id="1234" parentID="-1" level="1" creatorID="1" sortOrder="0" createDate="2014-12-16T00:00:00" updateDate="2014-12-16T00:00:00" nodeName="Home" urlName="home" path="-1,1156" isDoc="" nodeType="1111" creatorName="admin" writerName="admin" writerID="1" template="0" nodeTypeAlias="HomePage"> | |
<archetypeLinks><![CDATA[{"fieldsets":[{"properties":[{"alias":"linkUrl","value":"http://www.example.com/"},{"alias":"linkLabel","value":"Website"}],"alias":"externalLink","disabled":false},{"properties":[{"alias":"linkUrl","value":"http://www.example2.com/"},{"alias":"linkLabel","value":"Webshop"}],"alias":"externalLink","disabled":false}]}]]></archetypeLinks> | |
<json:archetypeLinks xmlns:json="http://pimpmyxslt.com/json"> | |
<fieldsets> | |
<properties> | |
<alias>linkUrl</alias> | |
<value>http://www.example.com/</value> | |
</properties> | |
<properties> |
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
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@using Archetype.Models; | |
@using Archetype.Extensions; | |
@{ | |
Layout = null; | |
} | |
//use case #1 - Covers a single Archetype | |
@foreach (var fieldset in Model.Content.GetPropertyValue<ArchetypeModel>("a1")) | |
{ |
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.Collections.Generic; | |
using Moriyama.Library.Architecture; | |
using Newtonsoft.Json; | |
namespace Application.Search | |
{ | |
public class VortoPropertyIndexer | |
{ | |
// Somewhere in startup | |
//ExamineManager.Instance.IndexProviderCollection["ExternalIndexer"].GatheringNodeData += MoriyamaApplicationEventHandlerGatheringNodeData; |
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 CompanyViewModel { | |
// use partial view "StreetAddress.cshtml" | |
public StreetAddress MainAddress {get; set;} | |
// use partial view "CompactAddress.cshtml" | |
[UIHint("CompactAddress")] | |
public StreetAddress StoreAddress {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
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: --> | |
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png"> | |
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: --> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png"> | |
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: --> | |
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png"> | |
<!-- For iPhone with high-resolution Retina display running iOS ≤ 6: --> |
NewerOlder