I'm picking a bunch of files using the ultimate picker and for the life of me can't actually output anything to do with the files.. i've tried getmedia and now am back on get node by id.. does anyone have an example of how to display medai with the ultimate picker??
I never reminder how datatypes store data... but I always use a simple trick to find out what is stored... using <xsl:copy-of> or putting the *unknown* factor in a <textarea> field
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
Ultimate Content Picker + Media?
Hi Guys,
I'm picking a bunch of files using the ultimate picker and for the life of me can't actually output anything to do with the files.. i've tried getmedia and now am back on get node by id.. does anyone have an example of how to display medai with the ultimate picker??
<xsl:for-each select="$insuranceServices">
<xsl:if test="umbraco.library:IsProtected(@id, @path) = 0 or (umbraco.library:IsProtected(@id, @path) = 1 and umbraco.library:IsLoggedOn() = 1 and umbraco.library:HasAccess(@id, @path) = 1)">
<xsl:variable name="ultimatePickerContent" select="umbraco.library:Split(data [@alias = 'pageFileAttachments'],',')" />
<div>
<xsl:attribute name="class">
<xsl:value-of select="umbraco.library:Replace(@nodeName, ' ', '-')"/>
</xsl:attribute>
<xsl:value-of select="data[@alias='bodyText']" disable-output-escaping="yes"/>
<xsl:for-each select="$ultimatePickerContent">
<div>
<p><strong><xsl:value-of select="umbraco.library:GetXmlNodeById(.)/data[@alias='umbracoFile']" /></strong></p>
</div>
</xsl:for-each>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:attribute name="class">
<xsl:value-of select="umbraco.library:Replace(@nodeName, ' ', '-')"/>
</xsl:attribute>
<xsl:value-of select="@nodeName"/>
</a>
</div>
</xsl:if>
</xsl:for-each>
Hi Tom,
I never reminder how datatypes store data... but I always use a simple trick to find out what is stored... using <xsl:copy-of> or putting the *unknown* factor in a <textarea> field
So, what's the outcome of
when viewing in a browser?
It's probably the id of a media item... so, if you need the file reference of the media item, you'd need
If it's a content item, you'd get the info about this item using your GetXmlNodeById() method
Hope this helps.
Regards,
/Dirk
Hi Dirk!
thanks so much! worked like a charm! most appreciated!
actually alas! @id i get an error saying
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
any help?
the split doesn't seem to be working i'm only getting one text area with one string of nodeids all joint togehter ie 106510661067 instead of
<textarea>1065</textarea><textarea>1066</textarea><textarea>1067</textarea>
very odd!
ahh sorry! fixed it needed to be <xsl:for-each select="$ultimatePickerContent/value">
is working on a reply...