Hey,
i normely use version 6 but need to start on 7 so i rann in to a problem..
i cant seam to get my image slider macro to work.
this is who i hvad made it but i dos not show the image..
this is wath i think is to be, but no go.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Examine="urn:Examine"
exclude-result-prefixes="msxml umbraco.library Examine ">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:param name="currentPage"/>
<!-- Don't change this, but add a 'contentPicker' element to -->
<!-- your macro with an alias named 'source' -->
<xsl:variable name="source" select="/macro/source"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul>
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']">
<li data-transition="random" data-slotamount="7" data-masterspeed="500" data-saveperformance="on" data-title="@nodebilledeNavn">
<img src="@nodeimage" alt="@nodealtText" data-bgposition="center top" data-bgfit="cover" data-bgrepeat="no-repeat"/>
<div class="tp-caption default_bg large sfr tp-resizeme"
data-x="0"
data-y="30"
data-speed="600"
data-start="1200"
data-end="9400"
data-endspeed="600">"@nodecaptationTekst"
</div>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
this is my old macro.
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
var startNodeID = Parameter.nodeId;
}
@if (startNodeID != null)
{
@* Get the start node as a dynamic node *@
var startNode = Library.NodeById(startNodeID);
if (startNode.Children.Where("Visible") .Any())
{
<ul class="slides">
@foreach (var page in startNode.Children.Where("Visible"))
{
<li data-transition="random" data-slotamount="7" data-masterspeed="500" data-saveperformance="on" data-title="@page.billedeNavn">
<img src="@page.image" alt="@page.altText" data-bgposition="center top" data-bgfit="cover" data-bgrepeat="no-repeat"/>
<div class="tp-caption default_bg large sfr tp-resizeme"
data-x="0"
data-y="30"
data-speed="600"
data-start="1200"
data-end="9400"
data-endspeed="600">"@page.captationTekst"
</div>
</li>
}
</ul>
}
}
Michael
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/72506-xslt-macro-not-working