I am not really sure how to tag this, but here is my issue. I am using a hierarchical transformation and a universal viewer to generate my side navigation. In one section of my site I have need to only show sub items for the selected path(a setting available in the CMS Menu Control, however that control is not flexible enough to suit my needs). By breaking the where clause, I am able to see what query is being called, thus I can create a view in site manager to test my conditionals in advance. Here is the query being generated:
SELECT *
FROM View_CMS_Tree_Joined
WHERE ((((NodeSiteID = 38) AND (Published = 1))
AND (DocumentCulture = N'en-US')) AND (NodeAliasPath LIKE N'/Products/%'))
AND ((DocumentMenuItemHideInNavigation = 0) OR (DocumentMenuItemHideInNavigation IS NULL) OR (DocumentMenuItemHideInNavigation = ''))
AND ((NodeLevel = 2) OR (SUBSTRING(NodeAliasPath,1,50) = SUBSTRING('{%CurrentDocument.NodeAliasPath#%}',1,50)))
When I test this query, I get the expected results from my view. All items directly under "Products" as well as the sub items on my current path. However, when my condition is added to the where condition of my universal viewer webpart, all I get are the items directly under "Products". The rest of the tree is collapsed. What I am wondering if there is a particular setting that I may have set to cause this behavior. Here are the web part control settings:
Path - /{0}/%
Maximum Nesting level - 2
WhereCondition - ((DocumentMenuItemHideInNavigation = 0) OR (DocumentMenuItemHideInNavigation IS NULL) OR (DocumentMenuItemHideInNavigation = '')) AND ((NodeLevel = 2) OR (SUBSTRING(NodeAliasPath,1,50) = SUBSTRING('{%CurrentDocument.NodeAliasPath#%}',1,50)))
And I am using a hierarchical transformation. On any section where I do not add my where condition, I see what I would expect(2 levels of navigation on the selected path)
Any thoughts as to what might be happening, or an alternative solution to the problem of showing items on a selected path?
Thank you in advance.