Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, I am trying to make a macro that will display some elements from a doctype. All is fine other than the mediapicker type. I can't see the image. Can anyone point out what could be wrong?
This is how the macro looks:
<xsl:variable name="author" select="$currentPage/ancestor-or-self::umbBlog//umbBlogPost"/> <div id="writersWrapper"> <xsl:for-each select="$currentPage/ancestor-or-self::umbBlog//Profiles"> <xsl:sort select="./name" order="ascending"/> <a href="{umbraco.library:NiceUrl(./@id)}"> <div class="oneWriter"> <div class="writerInfo"> <xsl:value-of select="./name" disable-output-escaping="yes" /> <br/> <xsl:value-of select="./jobPosition" disable-output-escaping="yes" /> <br/><br/><br/> </div> <div class="writerPic"> <xsl:value-of select="./profilePicture" disable-output-escaping="yes" /> </div> <div class="writerContact"> <xsl:value-of select="./email" disable-output-escaping="yes" /> <br/> <xsl:value-of select="./departmentPhone" disable-output-escaping="yes" /> </div> </div> </a> </xsl:for-each> </div>
Hi Alexandru, Try this one instead
<xsl:variable name="author" select="$currentPage/ancestor-or-self::umbBlog//umbBlogPost"/><div id="writersWrapper"> <xsl:for-each select="$currentPage/ancestor-or-self::umbBlog//Profiles"> <xsl:sort select="./name"order="ascending"/> <a href="{umbraco.library:NiceUrl(./@id)}"> <div class="oneWriter"> <div class="writerInfo"> <xsl:value-of select="./name" disable-output-escaping="yes"/><br/> <xsl:value-of select="./jobPosition" disable-output-escaping="yes"/><br/><br/><br/> </div> <div class="writerPic"> <xsl:variable name="media" select="umbraco.library:GetMedia(./profilePicture,0)"/> <xsl:if test="$media"> <xsl:variable name="url" select="$media/umbracoFile"/> <xsl:variablename="alt" select="$media/@nodeName"/> <xsl:variable name="width" select="$media/umbracoWidth"/> <xsl:variable name="height" select="$media/umbracoHeight"/> <img src="{$url}" alt="{$alt}" width="{$width}" height="{$height}"/> </xsl:if> </div> <div class="writerContact"> <xsl:value-of select="./email" disable-output-escaping="yes"/><br/> <xsl:value-of select="./departmentPhone" disable-output-escaping="yes"/> </div> </div> </a> </xsl:for-each></div>
The attributs width, height and alt tag, are optional.
Hope this helps,
/Dennis
Thank you so much for this. It was of great help! :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Media Picker display
Hi, I am trying to make a macro that will display some elements from a doctype. All is fine other than the mediapicker type. I can't see the image. Can anyone point out what could be wrong?
This is how the macro looks:
Hi Alexandru,
Try this one instead
<xsl:variable name="author" select="$currentPage/ancestor-or-self::umbBlog//umbBlogPost"/>
<div id="writersWrapper">
<xsl:for-each select="$currentPage/ancestor-or-self::umbBlog//Profiles">
<xsl:sort select="./name"order="ascending"/>
<a href="{umbraco.library:NiceUrl(./@id)}">
<div class="oneWriter">
<div class="writerInfo">
<xsl:value-of select="./name" disable-output-escaping="yes"/><br/>
<xsl:value-of select="./jobPosition" disable-output-escaping="yes"/><br/><br/><br/>
</div>
<div class="writerPic">
<xsl:variable name="media" select="umbraco.library:GetMedia(./profilePicture,0)"/>
<xsl:if test="$media">
<xsl:variable name="url" select="$media/umbracoFile"/>
<xsl:variablename="alt" select="$media/@nodeName"/>
<xsl:variable name="width" select="$media/umbracoWidth"/>
<xsl:variable name="height" select="$media/umbracoHeight"/>
<img src="{$url}" alt="{$alt}" width="{$width}" height="{$height}"/>
</xsl:if>
</div>
<div class="writerContact">
<xsl:value-of select="./email" disable-output-escaping="yes"/><br/>
<xsl:value-of select="./departmentPhone" disable-output-escaping="yes"/>
</div>
</div>
</a>
</xsl:for-each>
</div>
The attributs width, height and alt tag, are optional.
Hope this helps,
/Dennis
Thank you so much for this. It was of great help! :)
is working on a reply...