I've searched and searched, but can't find any solution, to get a specific tab on a Item.
The reason I want to do this, is to get every single field in this tab, and render every field to the page. If this is possible, then all I need to do, if I want to add some more information to the tah, is to add it to the documenttype, end than it is available, and gets rendered.
But is there a way to not only get the propertyType.Name on the documenttype, but also the propertyvalue on the current node, based on that documenttype, in a specific tab ?
I'm fairly new to Umbraco, but it makes sense what you suggest.
Something like
Node current = Node.GetCurrent(); DocumentType dt = DocumentType.GetByAlias(current.NodeTypeAlias); if(dt != null) { foreach (var tab in dt.getVirtualTabs) { // The tab I'm searchin for has ID 17 if (tab.Id == 17) { foreach (var propertyType in tab.PropertyTypes) { new LiteralControl { Text = string.Format("{0}-{1}", propertyType.Name, current.GetProperty(propertyType.Alias))}; } } } }
Haven't tried it yet, since I won't have acces to the solution until tomorrow...
Get Specific tab
Hey Fellow developers
I've searched and searched, but can't find any solution, to get a specific tab on a Item.
The reason I want to do this, is to get every single field in this tab, and render every field to the page. If this is possible, then all I need to do, if I want to add some more information to the tah, is to add it to the documenttype, end than it is available, and gets rendered.
Any solution ?
Best Regards
Kristoffer
might check http://our.umbraco.org/forum/using/ui-questions/14558-Loop-through-tab-properties
Hey kows
Great link.
But is there a way to not only get the propertyType.Name on the documenttype, but also the propertyvalue on the current node, based on that documenttype, in a specific tab ?
Best Regards
Kristoffer
use the alias from each propertytype and get the value combined with Node.GetCurrent() ?
Hey Kows
I'm fairly new to Umbraco, but it makes sense what you suggest.
Something like
Haven't tried it yet, since I won't have acces to the solution until tomorrow...
Just to do a follow up. The above works perfect.
Thank you for pointing me in the right direction
is working on a reply...