You are using old methods, header I would rewrite to:
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var startNodeID = Model.MacroParameters["nodeId"];
}
@if (startNodeID != null)
{
@* Get the start node as a dynamic node *@
var startNode = Umbraco.Content(startNodeID);
if (startNode.Children.Where("Visible").Any())
{
<ul>
@foreach (var page in startNode.Children.Where("Visible"))
{
And it's not a strongly typed also, so not perfect.
where you have a problem, code like that doesn't work:
@page.data-masterspeed
Are you sure you have "data-masterspeed" property alias? Maybe "dataMasterspeed?
whit the help you provided I believe I have fix it now the XSLT works I believe this it how it looks. I shows up and runs it dos not restart bud I believe I just ned to twerk on som.
Image Slider Macro problem
Hey,
im making a new weebpaker for a body off live using Umbraco version 7.10.2 and for som reason I can't get my head around why my macro dont work.
This is how it looks
@{ var startNodeID = Parameter.nodeId; }
@if (startNodeID != null) {
@* Get the start node as a dynamic node *@ var startNode = Library.NodeById(startNodeID);
}
I hvae tryed to convert it to XSLT but my problem is I can get it to work and the problem is in this line
I can't wrap my head around it to get it to work
I hop som can help me
Best regards Michael
Hi Michael
You are using old methods, header I would rewrite to:
And it's not a strongly typed also, so not perfect.
where you have a problem, code like that doesn't work:
Are you sure you have "data-masterspeed" property alias? Maybe "dataMasterspeed?
Thanks,
Alex
Hey Alex,
Well you is right about the @page.data-masterspeed but I dint look at as I use the macro on a mother site ware it works 100 %. whit that error
i made the chance you advice me to and now my page dont fail in loading but gifs this. Error loading MacroEngine script (file: ForsideSlider.cshtml)
This is how it looks like now have I miss something
@{ var startNodeID = Model.MacroParameters["nodeId"]; }
@if (startNodeID != null) { @* Get the start node as a dynamic node *@ var startNode = Umbraco.Content(startNodeID);
}
Try to wrap "onHoverStop: 'on'" into
Nop dint work i even relived it.. you can se the site her. Levins
Can you have a look at app_data/logs?
Yes this is the log
2018-05-11 11:51:18,909 [P1452/D2/T83] WARN umbraco.macro - Error loading MacroEngine script (file: ForsideSlider.cshtml, Type: ''. Exception: System.InvalidCastException: Context Must Implement System.Web.WebPages.WebPage at umbraco.MacroEngines.RazorMacroEngine.CompileAndInstantiate(String virtualPath) at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage) at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage) at umbraco.macro.loadMacroScript(MacroModel macro) at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Hey Alex,
whit the help you provided I believe I have fix it now the XSLT works I believe this it how it looks. I shows up and runs it dos not restart bud I believe I just ned to twerk on som.
will not show the code even if use a code tag
]>
is working on a reply...