Developer forum

Forum » CMS - Standard features » ChildCount in menu XML counting, altough child pages are unpublished

ChildCount in menu XML counting, altough child pages are unpublished

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

We are setting up a menu with a dropdown. Have set it up nicely, and it looks and acts like we want it to act - appart from one problem. If a page has subpages that are unpublished, the childcount still counts them in - and therefore shows a dropdown indication, altough there are no published pages underneath the page. That makes no sense to me. Is it a bug?

 

the solution is running version 8.9.1.7

 

BR Hans


Replies

 
Nicolai Pedersen
Reply

Hi Hans

You should instead check if the current node have children:

<xsl:if test="count(Page)">

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

ok, thank you :)

 

You must be logged in to post in the forum