1

Pagemodel with default properties contains

{PageModel: 417519 ('Home pagina')}

ExtensionData: null
HasNoCacheAttribute: false
HtmlClasses: "hom_"
Id: "417519"
IsVolatile: false
Meta: Count = 6
MvcData: {mymodule:Page:HomePage}
..

What statement can I use to get Page.HtmlClasses within Razor component view ?

Next statement doesn't works (need value from Page model)

@(Page.HtmlClasses)@(Model.HtmlClasses)@tegel.Id

Example for extending tile-id. Next statement works

@(Model.HtmlClasses)@tegel.Id

                <bgl-tile tile-title="@tegel.Title"
                          tile-description="@tegel.Text"
                          tile-url="@tegel.Link"
                          tile-id="@(Model.HtmlClasses)@tegel.Id">
                </bgl-tile>

second question:

Can I declare within Razor Page view variable or extend the page model with property and use that later in Razor component view?

3

Region and Entity Views primarily work on Region and Entity Models, respectively.

However, both have access to the entire context Page Model through the WebRequestContext.PageModel property.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.