hiim new to umbraco and macros are confusing me :(
- im trying to make a button that the webuser can pick two pictures for - mouseover - mouseoff.
how do i pull two different mediapickers into this macro - i can only write in the one variable there. and i dont know how to get a second (thought just making a
would do it but i might be getting the wrong idea of this.
can anyone tell me how i can pull out two mediapickers ?.
(heres what i got)
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']"> <!-- check if the 'media picker' property has a value --> <xsl:if test="data[@alias='excommknap'] != ''">
<!-- get the media XML and assign it to a variable --> <xsl:variable name="media" select="umbraco.library:GetMedia(number(data[@alias='excommknap']), 0)" />
<!-- check if the media XML contains an image path 'umbracoFile' --> <xsl:if test="count($media/data[@alias='umbracoFile']) > 0"> <a href="{umbraco.library:NiceUrl(@id)}">
<img class="ExcommKnap" src="{$media/data[@alias='umbracoFile']}" border="0" onmouseout="this.src='{$media/data[@alias='umbracoFile']}';this.alt='Der opstod en fejl med billede';" onmouseover="this.src=' <------this is where i want the second media picker to be placed ---------> ';this.alt='Der opstod en fejl med billede';"/>
multiple variables to pull different mediapicker.
hiim new to umbraco and macros are confusing me :(
- im trying to make a button that the webuser can pick two pictures for - mouseover - mouseoff.
how do i pull two different mediapickers into this macro - i can only write in the one variable there. and i dont know how to get a second (thought just making a
<xsl:variable name="media" select="umbraco.library:GetMedia(number(data[@alias='excommknap']), 0)" />
<xsl:variable name="media2" select="umbraco.library:GetMedia(number(data[@alias='excommhoverknap']), 0)" />
would do it but i might be getting the wrong idea of this.
can anyone tell me how i can pull out two mediapickers ?.
(heres what i got)
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']">
<!-- check if the 'media picker' property has a value -->
<xsl:if test="data[@alias='excommknap'] != ''">
<!-- get the media XML and assign it to a variable -->
<xsl:variable name="media" select="umbraco.library:GetMedia(number(data[@alias='excommknap']), 0)" />
<!-- check if the media XML contains an image path 'umbracoFile' -->
<xsl:if test="count($media/data[@alias='umbracoFile']) > 0">
<a href="{umbraco.library:NiceUrl(@id)}">
<img class="ExcommKnap" src="{$media/data[@alias='umbracoFile']}" border="0"
onmouseout="this.src='{$media/data[@alias='umbracoFile']}';this.alt='Der opstod en fejl med billede';"
onmouseover="this.src=' <------this is where i want the second media picker to be placed ---------> ';this.alt='Der opstod en fejl med billede';"/>
</a>
</xsl:if>
</xsl:if>
</xsl:for-each>
any help is appreciated.
Hmnn.. Adding an extra variable should be enough, I think. And then pulling the image like you're doing at the onmouseout:
I don't know if the javascript works, though. :)
is working on a reply...