Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sam 79 posts 426 karma points
    Oct 20, 2015 @ 19:24
    Sam
    0

    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?

  • Alex Skrypnyk 6147 posts 24056 karma points MVP 8x admin c-trib
    Oct 20, 2015 @ 21:16
    Alex Skrypnyk
    100

    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

  • Sam 79 posts 426 karma points
    Nov 17, 2015 @ 15:11
    Sam
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft