Adding extension methods to PartialViewMacroModel to allow: Model.GetParameterValue<DateTime>("datey")
Model.GetParameterValue<int>("booly", 8) //optional default value if parsing can't happen
Model.GetParameterValue("booly",8) // can be used like this as type is implied by default value argument
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Umbraco.Web.Models
|
||||
return attempt.Success ? (T) attempt.Result : defaultValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Attempt to get a Marco parameter from a PartialViewMacroModel
|
||||
/// </summary>
|
||||
/// <param name="partialViewMacroModel"></param>
|
||||
|
||||
Reference in New Issue
Block a user