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!
This is part of my loop to list the 5 latest news:
<xsl:for-each select="current()/* [@isDoc and string(showInNavigation) != '1']"><xsl:sort select="@createDate" order="descending" /> <xsl:if test="position() <= $numberOfItems"><li><!--<a href="{umbraco.library:NiceUrl(@id)}">--><xsl:if test="$currentPage/@id = current()/@id"><xsl:attribute name="class">Selected</xsl:attribute></xsl:if>Nodnamn: <xsl:value-of select="@nodeName"/><!--</a>--><xsl:if test="count(current()/* [@isDoc and string(showInNavigation) != '1']) > '0'"><xsl:call-template name="submenu"><xsl:with-param name="level" select="$level+1"/></xsl:call-template></xsl:if></li> </xsl:if> </xsl:for-each>
Is it possible to retrieve information from inside each node? Right now all it does is to list the 5 latest node names. But I'd also like to get the field called newsText from each node. Is it possible?
I'd love all the help I can get! :)
Hi Daniel,
You can call your document field type inside your loop so that each node will also display what you entered depending on the content.
Simply call your document type field alias by clicking on the button on top or your dashboard in your corresponding xslt (insert xsl:value-of)
<xsl:for-eachselect="current()/* [@isDoc and string(showInNavigation) != '1']"><xsl:sortselect="@createDate"order="descending"/> <xsl:iftest="position() <= $numberOfItems"><li><!--<a href="{umbraco.library:NiceUrl(@id)}">--><xsl:iftest="$currentPage/@id = current()/@id"><xsl:attributename="class">Selected</xsl:attribute></xsl:if>Nodnamn: <xsl:value-ofselect="@nodeName"/> <<!-- Your Value Here --> <xsl:value-of select="newsText"/> <!--</a>--><xsl:iftest="count(current()/* [@isDoc and string(showInNavigation) != '1']) > '0'"><xsl:call-templatename="submenu"><xsl:with-paramname="level"select="$level+1"/></xsl:call-template></xsl:if></li> </xsl:if> </xsl:for-each>
Hope this helps
Great, it works
I tried @newsText inside my xsl-value but I should've used your way of course. Thanks for your help!
Glad i could help
//fuji
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Retrieve field from inside each node in loop
Hi!
This is part of my loop to list the 5 latest news:
Is it possible to retrieve information from inside each node? Right now all it does is to list the 5 latest node names. But I'd also like to get the field called newsText from each node. Is it possible?
I'd love all the help I can get! :)
Hi Daniel,
You can call your document field type inside your loop so that each node will also display what you entered depending on the content.
Simply call your document type field alias by clicking on the button on top or your dashboard in your corresponding xslt (insert xsl:value-of)
Hope this helps
Great, it works
I tried @newsText inside my xsl-value but I should've used your way of course. Thanks for your help!
Glad i could help
//fuji
Glad i could help
//fuji
is working on a reply...