hi there I'm having some trouble rewriting this code in spark, we have a website which uses both Spark and Razor, so when we do anything in razor it has to change in spark as well. I have been using macros for spark but it doesn't seem to work.
Here is the Razor code
@helper ImageFeature(INavigationNode node)
{
<figure>
<a href="@node.NavigationUrl">
@if (!string.IsNullOrEmpty(node.ImageUrl))
{
<img src="@node.ImageUrl" alt=""/>
}
<figcaption>@Html.Raw(node.Content)</figcaption>
</a>
</figure>
}
Here is the Spark
<macro name="ImageFeature" node="INavigationNode">
<figure>
<a href="${node.NavigationUrl}">
<if condition="(!string.IsNullOrEmpty(node.ImageUrl))">
<img src="%{node.ImageUrl}" alt=""/>
</if>
<figcaption>${Html.Raw(node.Content)}</figcaption>
</a>
</figure>
</macro>
What do I change to make it work in spark?
So far I get this error:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\3283b8a3\90ba10e3fe4a4a67979bb48611718cb7-1.cs(33,25): error CS0246: The type or namespace name 'INavigationNode' could not be found (are you missing a using directive or an assembly reference?)
INavigatonNode is a type