Expose some properties which could be useful for iterating and template decision-making
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user