I know you have on the main page that you will include an XSLT when you have your home site set up but i dont see a way of getting that content now? i tried a few XSLTs and just displaying the field itself and so far no luck. can you post a short XSLT example of how to pull out the content?
I haven't used this package yet so I'm not sure of it's XML schema, but if you do a dump of the XML we should be able to figure it out. Try adding the below to your macro and paste the XML that appears in the textbox to find out how it's storing it's XML.
Yeh I still need to build my own site to host all my code and examples and documentation. Anyway until then to access your MultiType items you can use this code:
im sure i can figure it out now that i see the schema of it but here is what i have
<featuredItem2> <Items> <Item id="1" sortId="1"> <title>Featured Item 2</title> <caption>Testing to see how to display it</caption> <description>hope it works</description> <image>1212</image> </Item> </Items> </featuredItem2>
Quick XSLT example?
I know you have on the main page that you will include an XSLT when you have your home site set up but i dont see a way of getting that content now? i tried a few XSLTs and just displaying the field itself and so far no luck. can you post a short XSLT example of how to pull out the content?
Hi,
I haven't used this package yet so I'm not sure of it's XML schema, but if you do a dump of the XML we should be able to figure it out. Try adding the below to your macro and paste the XML that appears in the textbox to find out how it's storing it's XML.
<textarea><xsl:copy-of select="$currentPage/yourPropertyAliasHere" /></textarea>
-Tom
Hi mfeola,
Yeh I still need to build my own site to host all my code and examples and documentation. Anyway until then to access your MultiType items you can use this code:
<xsl:for-each select="$currentPage/labelsAndValues/Items">
<xsl:value-of select="./Item"/>
</xsl:for-each>
I have a document type with a property with an alias of labelsAndValues and type of MultiType.
Then if you need to access your Item properties then you can use the alias you defined on the MultiType datatype:
<xsl:for-each select="$currentPage/labelsAndValues/Items">
Label: <xsl:value-of select="./Item/label"/>
Value: <xsl:value-of select="./Item/value"/>
</xsl:for-each>
Hope this helps
Ben
oh, great idea! now all the XML is coming up.
im sure i can figure it out now that i see the schema of it but here is what i have
Oh yeh and as you can see if you use an media picker it will save the node id of the image therefore I usually use:
<xsl:variable name="image" select="umbraco.library:GetMedia($imageId, 'true')/umbracoFile"/>
To get the image the I can use $image which will look something like /media/72/image.jpg
<xsl:value-of select="$image"/>
Ben
is working on a reply...