Expose some properties which could be useful for iterating and template decision-making

This commit is contained in:
Kevin Giszewski
2014-02-07 09:39:57 -05:00
parent 33f95253f9
commit bf9e4d53df
3 changed files with 14 additions and 10 deletions
@@ -1,4 +1,7 @@
namespace Archetype.Umbraco.Extensions
using Umbraco.Core;
using Archetype.Umbraco.Models;
namespace Archetype.Umbraco.Extensions
{
public static class Extensions
{
@@ -9,5 +12,10 @@
return input.StartsWith("{") && input.EndsWith("}")
|| input.StartsWith("[") && input.EndsWith("]");
}
public static bool IsArchetype(this Property prop)
{
return prop.PropertyEditorAlias.InvariantEquals("Imulus.Archetype");
}
}
}
@@ -11,7 +11,7 @@ namespace Archetype.Umbraco.Models
{
public string Alias { get; set; }
internal IEnumerable<Property> Properties;
public IEnumerable<Property> Properties;
public Fieldset()
{
@@ -1,14 +1,10 @@
namespace Archetype.Umbraco.Models
{
internal class Property
public class Property
{
internal string Alias { get; set; }
internal object Value { get; set; }
// If you decide to make Properties public
// ensure these properties remain internal
// as they aren't meant for external use
public string Alias { get; internal set; }
public object Value { get; internal set; }
public string PropertyEditorAlias { get; internal set; }
internal int DataTypeId { get; set; }
internal string PropertyEditorAlias { get; set; }
}
}