i have a parent node, Crew and child node crewMembers the crew members have a property which is a related link datatype, while i can render the links on the individual crewMember page, I am trying to render all crewMembers details on the crew page , hers my last effort,
Wasn't this what you wanted? To render all of the content from every related links properties on the Crew page? Or am I missing something obvious here? :)
It's probably me who misunderstod your question, but could you try explain it in more details or in some other way maybe?
Related links
i have a parent node, Crew and child node crewMembers the crew members have a property which is a related link datatype, while i can render the links on the individual crewMember page, I am trying to render all crewMembers details on the crew page , hers my last effort,
<ul>
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
<div id="crew">
<ul>
<li class="top-item"><h2> <xsl:value-of select="@nodeName"/></h2></li>
<li class="position-type"><xsl:value-of select="./role"/></li>
<li><h4>Hometown</h4><xsl:value-of select="./homeTown"/></li>
<li class="mid-item"><h4>Catch me at</h4>
<xsl:call-template name="renderLinks" />
</li>
<li class="last-item"><h4>Bio</h4><xsl:value-of select="./bio"/></li>
</ul>
</div>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template name="renderLinks">
<xsl:for-each select=" $currentPage/* [name() = $propertyAlias and not(@isDoc)]/links/link">
<li>
<xsl:element name="a">
<xsl:if test="./@newwindow = '1'">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="./@type = 'external'">
<xsl:attribute name="href">
<xsl:value-of select="./@link"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">
<xsl:value-of select="umbraco.library:NiceUrl(./@link)"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="./@title"/>
</xsl:element>
</li>
</xsl:for-each>
</xsl:template>
Hi Grant
Could you try changing your for-each to this:
Just to see if this does render anything at all.
/Kim A
Gave this try but it rendered everyones related links against ever crew member,
Grant
Wasn't this what you wanted? To render all of the content from every related links properties on the Crew page? Or am I missing something obvious here? :)
It's probably me who misunderstod your question, but could you try explain it in more details or in some other way maybe?
/Kim A
what i'm looking for is something like:
Jo Bloggs
joe link 1
joe link 2
joe link 3
Bob Smith
bob link 1
James Jones
james link 1
james link 2
What i got when i changed the for each
was
Jo Bloggs
joe link 1
joe link 2
joe link 3
bob link 1
james link 1
james link 2
Bob Smith
joe link 1
joe link 2
joe link 3
bob link 1
james link 1
james link 2
James Jones
joe link 1
joe link 2
joe link 3
bob link 1
james link 1
james link 2
Grant
Ahh now I get it . Sorry :)
I'm not sure the following will work, but could you try giving it a shot?:
Chage the call-template to:
And then change the first two lines of renderLinks to this:
As I said, I'm not sure this will work, but what does this give you?
/Kim A
no links rendered with this change, think I'll need to have a rethink
G
is working on a reply...