Using Parent field and reflection field together
This is an open discussion with 3 replies, filed under Extensions.
Search
@moonoo2 haven't used them together; usually when I need a parent-child hierarchy I actually use a normal SBL Field, then I do the rest with the ninja technique & a datasource containing all the entries. Works pretty neat and you can have unlimited nesting without issues.
SBL to entries from same section?
yes exactly I do something like this (usually more complex cos I use multilingual but this is the simplified version. I have a 'pages' section with all the content and I use 3-4 level hierarchy I use this to generate my links. Note that the 'navigation' ds is something I built by outputting all the pages Titles & url-handles (I use separate handles to titles but you could use title/@handle
<xsl:template match="*[section/@handle='pages']/entry" mode='link'> <xsl:choose> <xsl:when test="parent/item"> <xsl:apply-templates select='../../navigation/entry[@id=current()/parent/item/@id]' mode='link'/> </xsl:when> <xsl:otherwise> <xsl:value-of select='$domain'/><xsl:text>/</xsl:text> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test='url-handle/@handle = "home"'> <!-- home page do not append a handle --> </xsl:when> <xsl:otherwise> <xsl:value-of select="url-handle/@handle"/> </xsl:otherwise> </xsl:choose> </xsl:template>
Create an account or sign in to comment.
I am trying to determine what the reflection field takes as a value in order to understand why it doesn't grab any values from the Parent Field.
Was intending to use them together to build a nice concatenated value for url structure of nested page names + the title of the entry on the end..
But I can't seem to get the reflection field to include a value from the Parent Field in the section entry.
Has anyone used these 2 extensions together in this way successfully before?