Hello, I am new to Umbraco, and also new to MVC views and .net applications, so I hope someone can help me.
I want to allow a content editor to input/edit contact information that can be used across multiple pages and also in the master template header.
I have created a document type and I am attempting to use a partial view to render the content in the template. The structure renders but the content does not.
The content is in the content tree, but is a sibling to the basic page content.
Am i going about this the wrong way? How can i query and display the content into the templates?
It's common issue for umbraco developers.
You can store your contact data on the start page node, if you are using typical node structure with home node and descendants.
Then you can get this data from all pages of your site.
Thanks for your feed back, and sorry for my slow response.
Are you saying a should have the contact data input at the root level, and that would make the content available across all templates? Does that include master templates?
What would the @umbraco helper look like to pull this data?
reuse dynamic data in multiple pages or templates
Hello, I am new to Umbraco, and also new to MVC views and .net applications, so I hope someone can help me.
I want to allow a content editor to input/edit contact information that can be used across multiple pages and also in the master template header.
I have created a document type and I am attempting to use a partial view to render the content in the template. The structure renders but the content does not.
The content is in the content tree, but is a sibling to the basic page content.
Am i going about this the wrong way? How can i query and display the content into the templates?
Hi Sam,
It's common issue for umbraco developers. You can store your contact data on the start page node, if you are using typical node structure with home node and descendants.
Then you can get this data from all pages of your site.
Look at Umbraco mvc helpers :
https://our.umbraco.org/documentation/reference/querying/umbracohelper/
Thanks, Alex
Thanks for your feed back, and sorry for my slow response.
Are you saying a should have the contact data input at the root level, and that would make the content available across all templates? Does that include master templates?
What would the @umbraco helper look like to pull this data?
Sorry if my question seems basic.
is working on a reply...