Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am relatively new to Umbraco and I recently updated to umbraco 10, which is great. For our components we extended the functionality with the uSkinned components. What I want to accomplish is a partial view which must access some global properties configured at Homepage level.
Currently all I have in my partial view is as follows:
@inject ISiteBuilderService _siteBuilderService
Layout = null;
var test = Model.BaseModel.GlobalSettings;
@await Html.PartialAsync("LicensePlate", Model)
What I want, is to access global properties from Homepage level, but I cannot find any property in the instantiated
The properties which are configured in this, so called, CTA group, are configured at the highest level of the project. The values themself are extracted properly.
In the partial view I want to access these values.
Anyone any clue how to gracefully accomplish this?
Currently I found a solution. I can only extract values by there alias on PublishedContent. SiteBuilderBlock has a parented PublishedContent in it's BaseModel which can access the global properties by it's alias:
Now to be 100% safe, I need to search until parent == null since the properties are defined at top level page.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted