Need to pass dynamic model, or call controller method in Partial View Macro
Hi everyone,
Umbraco 7.3.4
Here's my Partial View Macro code - description of problem below:
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var newLowestAPR = "1.50%"; //needs to be dynamic
var usedLowestAPR = "1.75%";
}
<ul class="featured-rates">
<li>
<h2><span>New Vehicle APR As Low As:</span></h2>
<h2>@newLowestAPR</h2>
</li>
<li>
<h2><span>Used Vehicle APR As Low As:</span></h2>
<h2>@usedLowestAPR</h2>
</li>
</ul>
Currently the APRs that are set have hardcoded values. I have the values I need within a backoffice controller that returns a list.
I'd ideally hit this controller method and pass the list to my view, and update the view with that data. //I've commented the variables above with what is static that should be dynamic.
My question is, what is the best route to go for getting my data?
Should I be attempting to access the backoffice controller method? I've read into surface controllers, but haven't had much luck. Even if I could simply read data from my umbraco database table, that would work.
Any help on this, or point outs in the correct direction would be extremely helpful.
Need to pass dynamic model, or call controller method in Partial View Macro
Hi everyone,
Umbraco 7.3.4
Here's my Partial View Macro code - description of problem below:
Currently the APRs that are set have hardcoded values. I have the values I need within a backoffice controller that returns a list.
I'd ideally hit this controller method and pass the list to my view, and update the view with that data. //I've commented the variables above with what is static that should be dynamic.
My question is, what is the best route to go for getting my data?
Should I be attempting to access the backoffice controller method? I've read into surface controllers, but haven't had much luck. Even if I could simply read data from my umbraco database table, that would work.
Any help on this, or point outs in the correct direction would be extremely helpful.
is working on a reply...