Access document type date that belongs to another page?
Hi,
Is it possible to access the values that are stored in another page?
i.e. On my homepage document type I have a 'Social' tab, in here I have my social media usernames which are used by a plugin on the homepage. I then have another document type, general page, but I would like to access the information that is stored within the homepage document type for the social tab. I don't want to have to enter my details in everytime.
Depending on how you are querying the field in your template you can make this field recursive. Which means will go up though the ancestors until it´s find the field on the page, and it has a value. Try to see this documentation.
Access document type date that belongs to another page?
Hi, Is it possible to access the values that are stored in another page?
i.e. On my homepage document type I have a 'Social' tab, in here I have my social media usernames which are used by a plugin on the homepage. I then have another document type, general page, but I would like to access the information that is stored within the homepage document type for the social tab. I don't want to have to enter my details in everytime.
Cheers,
Hi Owain,
Depending on how you are querying the field in your template you can make this field recursive. Which means will go up though the ancestors until it´s find the field on the page, and it has a value. Try to see this documentation.
Especially rendering a field with UmbracoHelper
https://our.umbraco.org/documentation/Reference/Templating/Mvc/views
Let´s say that you have a field called bodyContent, the the syntax would be like this
If you are in a partial view or partial view macro you can do something like this:
Hope this helps,
/Dennis
Thanks! That's perfect!
is working on a reply...