Thx napernik for your reply!
I now have the following code in my razor function file:
I now have the following code in my razor function file:
@using CompositeC1Contrib.RazorFunctions;
@using CompositeC1Contrib.RazorFunctions.FunctionProvider;
@using CompositeC1Contrib.RazorFunctions.Html;
@using Composite.Data;
@using Composite.Data.Types;
@using System.Linq;
@inherits CompositeC1WebPage
@{
var dataTypeDescriptor = DynamicTypeManager.GetDataTypeDescriptor(typeof (IPage));
foreach( var field in dataTypeDescriptor.Fields)
{
if (!field.Inherited)
{
OutPut(field.Name + " " + field.InstanceType);
if(field.InstanceType == typeof(string))
{
OutPut("Max length " + field.StoreType.MaximumLength);
}
}
}
}
But, I get the error " error CS0103: The name 'DynamicTypeManager' does not exist in the current context". Am i missing a reference in the using section?