You could create a partial view macro or a partial view, and pull out data by using Razor, you can so do it directly on your template. For each of your content pickers you need to use this code if you want strongly typed Razor,
@if (Model.Content.HasValue("contentPickerAlias")){ var node = Umbraco.TypedContent(Model.Content.GetPropertyValue<int>("contentPickerAlias")); <a href="@node.Url">@node.Name</a> }
Or this if you want to use dynamic razor.
@if (CurrentPage.HasValue("contentPickerAlias")){ var node = Umbraco.Content(CurrentPage.contentPickerAlias); <a href="@node.Url">@node.Name</a> }
Remember to change the contentPropertyAlias so it match each content pickers. You can find the alias of the content picker on your document type.
Thank you Dennis for thou hast answered but I fooled me formulate my question because I want to get no content types but the properties of a tab of a content type . are able to help me ?
Thanks Dennis for the help but I just now noticed that cheated me formulate my question because I plan to get no content types but the properties of a tab of a content type . are able to help me ?
Getting properties from content type by tab
Hi guys ,
I need get all content pickers from one certain tab .
How i can do this?
My umbraco version is 7.2
Hi Paulo,
You could create a partial view macro or a partial view, and pull out data by using Razor, you can so do it directly on your template. For each of your content pickers you need to use this code if you want strongly typed Razor,
Or this if you want to use dynamic razor.
Remember to change the contentPropertyAlias so it match each content pickers. You can find the alias of the content picker on your document type.
You can find the documentation on how to get data from a content picker here:https://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/Built-in-Property-Editors-v7/Content-Picker
Hope this helps,
/Dennis
Thanks Dennis for the help but I just now noticed that cheated me formulate my question because I plan to get no content types but the properties of a tab of a content type . are able to help me ?
is working on a reply...