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 there,
Ive used the embedded content package to create an address section within the footer of the page.I have then applie the macro within the master page.
My issue is that the content within the macro is not showing up within the child pages.
I can set the macro to recursive, but it doesnt popular the child pages.
My xslt for the macro is
Any help would be grateful
Martin
<xsl:param name="currentPage"/><xsl:template match="/"><!-- start writing XSLT --> <xsl:for-each select="$currentPage/footerAddress/data/item"> <ul class="footAddress"> <li><xsl:value-of select="line1"/></li> <li><xsl:value-of select="line2"/></li> <li><xsl:value-of select="city"/></li> <li><xsl:value-of select="state"/></li> <li><xsl:value-of select="country"/></li> <li><xsl:value-of select="area"/></li> <li>T: <xsl:value-of select="telNo"/></li> <li>E: <a> <xsl:attribute name="href">mailto:<xsl:value-of select="email"/></xsl:attribute> <xsl:value-of select="email"/> </a> </li> <li>W: <a href="http://{web}" target="_blank"> <xsl:value-of select="web"/> </a> </li> </ul> </xsl:for-each> </xsl:template>
Sorry guys,
Did some digging in the forums and got the correct $currentPage path for recursive values.
This did the trick.
<xsl:for-each select="$currentPage/ancestor-or-self::*[@level = 1]/footerAddress/data/item">
Hi Martin,
I think you need to change $currentPage to
$currentPage/ansestor-or-self/footerAddress ...
Check out this page on XPath Axis, might help you out in the future.
Hope this helps.
Ben
Oops, a little slow there.
Looks like you already got it, you don't need to specify the level or have ::* bit.
Cheers Ben,
That XPath Axis page will definitely come in helpful.
Thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Embedded Content - Recursive
Hi there,
Ive used the embedded content package to create an address section within the footer of the page.I have then applie the macro within the master page.
My issue is that the content within the macro is not showing up within the child pages.
I can set the macro to recursive, but it doesnt popular the child pages.
My xslt for the macro is
Any help would be grateful
Martin
Sorry guys,
Did some digging in the forums and got the correct $currentPage path for recursive values.
This did the trick.
Hi Martin,
I think you need to change $currentPage to
Check out this page on XPath Axis, might help you out in the future.
Hope this helps.
Ben
Oops, a little slow there.
Looks like you already got it, you don't need to specify the level or have ::* bit.
Ben
Cheers Ben,
That XPath Axis page will definitely come in helpful.
Thanks.
is working on a reply...