Taghelpers epi-property vs ProperyFor with parameters

Vote:
 

CMS12

Is there a way to send viewdata parameters with use of taghelper epi-property?

<div epi-property="@Model.CurrentPage.ImageAsContentReference" />

The equivalence with HtmlHelpers:

@Html.PropertyFor(m => Model.CurrentPage.ImageAsContentReference, new { width = 300, height = 300, format = "webp"});

then i can further down in the stack get the data with "ViewData" in my displaytemplate

#300039
Apr 13, 2023 10:22
Vote:
 

Im looking for something like this: https://learn.microsoft.com/en-us/aspnet/core/mvc/views/tag-helpers/built-in/partial-tag-helper?view=aspnetcore-6.0#view-data

but when testing <div epi-property="@Model.CurrentPage.ImageAsContentReference" view-data='@(new ViewDataDictionary(ViewData) { {  "width", 300 },{ "height", 300},{ "format", "webp" } })' />

it is rendering

<div view-data="Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary">      ... content comes here ... </div>



#300054
Apr 13, 2023 13:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.