NodeTypeAlias not finding any posts despite seemingly correct settings..
The below code is supposed to write down info about each blog post in the "blog" folder (current folder). There are about a hundred entries but nothing is showing up.
If I change the code by removing the part in bold below it works (of course writing entries for directories as well).
The posts in the folder are using a template called "umbracoBlog post". We have a doctype named "Blog Post" with Alias "UmbracoBlogPost" and allowed template is "umbracoBlog post".
We'r in the process of upgrading from 4.0.4.2 to 4.5 so the new xslt schema has caused a few problems but your solution for 4.5 worked perfectly :) Thanks very much.
NodeTypeAlias not finding any posts despite seemingly correct settings..
The below code is supposed to write down info about each blog post in the "blog" folder (current folder). There are about a hundred entries but nothing is showing up.
If I change the code by removing the part in bold below it works (of course writing entries for directories as well).
<xsl:for-each select="$currentPage/descendant-or-self::*[@isDoc] [@nodeTypeAlias = 'umbracoBlogPost' and string(umbracoNaviHide) != '1']">
<xsl:sort select="@createDate" order="descending"/>
<xsl:if test="position() <= $numberOfItems">
<xsl:call-template name="listpost">
<xsl:with-param name="node" select="."/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
The posts in the folder are using a template called "umbracoBlog post". We have a doctype named "Blog Post" with Alias "UmbracoBlogPost" and allowed template is "umbracoBlog post".
Is this all set up correctly?
Thanks! Max.
btw, new query after edit looks like this:
<xsl:for-each select="$currentPage/descendant-or-self::*[@isDoc] [string(umbracoNaviHide) != '1']">
(also the alias is "umbracoBlogPost" - first letter lower case unlike what I wrote in my first post - typo)
Hi Max,
Can you try this?
<xsl:for-each select="$currentPage/* [name() = string('umbracoBlogPost') and string(umbracoNaviHide) != '1']">
Bas
No luck, still shows nothing :(
Thanks for the help though, anybody else have any ideas?
Hi Max,
These are the XPaths you need for the different versions (don't really know if you're on 4.0 or 4.5):
For version 4.5:
For version 4.0:
/Chriztian
We'r in the process of upgrading from 4.0.4.2 to 4.5 so the new xslt schema has caused a few problems but your solution for 4.5 worked perfectly :) Thanks very much.
is working on a reply...