Keep getting an error loading partial view in the following code. I have added the praameters to the Macro but I know i'm doing somehitng stupid below.
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@*
Macro to display a gallery from a media folder. Add the below parameter to the macro
and use it to point the macro at a specific media folder to display it's content as
a simple list.
Macro Parameters To Create, for this macro to work:
Alias:demoPageID Name:Demo page ID Type:Content Picker
*@
@* Get the demo page as a dynamic node *@
@if (Model.MacroParameters["demoPageID"] != null)
{
@* Get the demo page *@
var demoPage = Umbraco.Content(Model.MacroParameters["demoPageID"]);
<div>
<a class="button" href="@demoPage.Url">Experience compliance made simple:</br>
CLICK TO TAKE A LIVE DEMONSTRATION <i class="fa fa-external-link-square"></i></a>
</div>
}
I have tried you code, and find what your problem is, the thing that gives your problem is that you are closing your break tag wrong. </br> instead of <br />
I have updated the code below.
@inherits Umbraco.Web.Macros.PartialViewMacroPage @* Macro to display a gallery from a media folder. Add the below parameter to the macro and use it to point the macro at a specific media folder to display it's content as a simple list.
Macro Parameters To Create, for this macro to work: Alias:demoPageID Name:Demo page ID Type:Content Picker *@ @* Get the demo page as a dynamic node *@
@if (Model.MacroParameters["demoPageID"] != null) { @* Get the demo page *@ var demoPage = Umbraco.Content(Model.MacroParameters["demoPageID"]);
<div> <a class="button" href="@demoPage.Url">Experience compliance made simple<br /> CLICK TO TAKE A LIVE DEMONSTRATION <i class="fa fa-external-link-square"></i></a> </div> }
Use content picker in PartialViewMacroPage
Keep getting an error loading partial view in the following code. I have added the praameters to the Macro but I know i'm doing somehitng stupid below.
Hi Stephen,
I have tried you code, and find what your problem is, the thing that gives your problem is that you are closing your break tag wrong. </br> instead of <br />
I have updated the code below.
Hope this helps,
/Dennis
Darn! Knew it would be something simple...thanks for taking the time to look.
is working on a reply...