From an MVC perspective I don't see what you're doing is wrong. If you're view inherits from:
UmbracoViewPage<TableEditorModel>
then you'll still have access to the UmbracoHelper.
As for your long lone, it is rather messy but I'm not sure what you're trying to actually achieve, but I wonder if you're not after something more like:
using Umbraco.Web;
model.Content.Children().First(c => c.DocumentTypeAlias == "someDocumentTypeAlias").GetPropertyValue<TableEditorModel>("somePropertyAlias")
Making a RenderModel more specific ( More an MVC question, but still Umbraco related)
This is more an ASP.Net MVC question...
What I am trying to do is accept a model that Umbraco is giving, but just give the view the TableEditorModel.
This code works, but I don't think it is very good.
Any suggestions on how to improve this line ?? Or maybe I should do this differently??
Thanks !!! Bill
From an MVC perspective I don't see what you're doing is wrong. If you're view inherits from:
then you'll still have access to the UmbracoHelper.
As for your long lone, it is rather messy but I'm not sure what you're trying to actually achieve, but I wonder if you're not after something more like:
Thanks, David !!
That is what I was looking for. To me, using numbers like "3" and "0" like in my original case is brittle code.
is working on a reply...