I have build a WebSiteConfig node on the same level as the Home node.
It uses a document type where i can include headerScripts for instance.
I want to use a partial view to insert this in my master template.
Creating the partial view is no problem, but i can't seem to render the headerScripts on this partial view. Any ideas or examples?
Using the inser value dropdown gives me:
@Model.Value("headerScripts")
But that Isn't working. That just displays nothing(no error).
Where did you place your partial? The partial will normally receive the model of the current page. So if you place the partial on the master template you'll need to specify your model.
So something like @Html.Partial("somepartialpath",Umbraco.TypedContentSingleAtXPath("//websiteConfig"))
Global Settings
I have build a WebSiteConfig node on the same level as the Home node. It uses a document type where i can include headerScripts for instance.
I want to use a partial view to insert this in my master template. Creating the partial view is no problem, but i can't seem to render the headerScripts on this partial view. Any ideas or examples?
Using the inser value dropdown gives me:
@Model.Value("headerScripts")
But that Isn't working. That just displays nothing(no error).
Any ideas?
I believe it would render the property as html
I would think so, but that don't work. If I print out my model on the partialview i get. Umbraco.Web.PublishedModels.Home
Where did you place your partial? The partial will normally receive the model of the current page. So if you place the partial on the master template you'll need to specify your model.
So something like @Html.Partial("somepartialpath",Umbraco.TypedContentSingleAtXPath("//websiteConfig"))
is working on a reply...