Sorry, I sometimes struggle at explaining myself as I get used to using Kentico.
Here is an small example of my Site's tree.
-
Root
-
Section Page Type
-
Main Page Type
-
Folder Page Type
-
SubMain Page Type
-
Folder Page Type
-
Normal Page Type
I have a hierarchical transformation on Main Page Type, SubMain Page Type and Normal Page Type. The path is set to ./% for each one so it is my understanding that the path will start at each respective Page Type in the tree and the output seems to verify that. The Web part property of my Hierarchical viewer has it's Maximum nesting level set to 2.
On level 0 of my hierarchical transformation, I specify only the Folder Page Type and on level 1 of my hierarchical transformation, I specify only the File Page Type.
Everything seems to work in all areas of my tree. The scenario that is giving me grief is if Main page type doesn't have a Folder 'directly' under it, but SubMain Page Type does. Same with if SubMain Page Type doesn't have a Folder 'directly under it, but Normal Page Type does.
Example (I've only highlighted the Hierarchical transformation on my Main Page Type for this example):
-
Root
-
Section Page Type
-
Main Page Type <-- Hierarchical transformation web part is here
-
SubMain Page Type
-
Folder Page Type <-- The Level 0 hierarchical transformation seems to run here, but only when there is no Folder Page Type directly under the Main Page Type. My Level 1 hierarchical transformation doesn't get a chance to run because at this point the web part has already reached it's Maximum nesting level of 2.
-
Normal Page Type
The only solution I could find was to remove the ability to add Folders and Files under the SubMain Page Type.
Alternatively, I was hoping I could just detect if my Level 0 hierarchical transformation was being run at the web parts maximum nesting level 2, if so I could hide it.