XSLT - Extracting property value from multiple pages
Hi there,
Please excuse my question if it's silly, I am a beginner to Umbraco, especially in the Macros and "XSLT" areas.
Below is a screenshot of my content:
Article 1, Article 2, etc. are content pages of document type "NewsArticle". The "NewsArticle" document type has a property called "newsArticleContent" of type Richtext Editor.
On a section of my website, i inserted a macro i created that needs to display those articles, separated by the <br /> element. This is what my .XSLT code looks like at the moment:
This is the content as it displays at the moment on the main webpage (The Cows Website). As you can see the content from the NewsArticle property isn't being displayed:
XSLT - Extracting property value from multiple pages
Hi there,
Please excuse my question if it's silly, I am a beginner to Umbraco, especially in the Macros and "XSLT" areas.
Below is a screenshot of my content:
Article 1, Article 2, etc. are content pages of document type "NewsArticle". The "NewsArticle" document type has a property called "newsArticleContent" of type Richtext Editor.
On a section of my website, i inserted a macro i created that needs to display those articles, separated by the <br /> element. This is what my .XSLT code looks like at the moment:
<xsl:variable name="newsArticleAlias" select="string('NewsArticle')"/>
<xsl:template match="/">
<xsl:for-each select="$currentPage/*/* [name() = $newsArticleAlias and string(umbracoNaviHide) != '1']">
testing 123...
<xsl:value-of select="data [@alias = 'newsArticleContent']" />
<br />
</xsl:for-each>
</xsl:template>
This is the content as it displays at the moment on the main webpage (The Cows Website). As you can see the content from the NewsArticle property isn't being displayed:
Any help would be greatly appreciated.
Thank you.
Regards,
Matei
Hi Matei,
Try something like this:
- and maybe look for articles describing "The new XML Schema"...
/Chriztian
Hi Chriztian,
Thanks for your reply. Your example was good, I just had to add the NewsSection as well in front of the NewsArticle:
Regards,
Matei
is working on a reply...