I think the behavior for "expandAll" is supposed to do just that - and will show the ones that are "hideInNav" pages (go figure) - I might be wrong. I don't use that the expandAll attribute on that tag.

I think the reason behind this goes something like this: ExpandAll you are explicitly saying "show me all the pages." HideInNav you are explicitly saying "hide pages with these attributes." I would side with you and think that the default behavior should be that the hideInNav would still apply if you have ExpandAll set.

In practice, I think the hideInNav is rather weak-sauce and were it entirely up to me I would gut it out and just have it rely on a contentFilter node. I would make a contentFilterChain contentFilter that would let you chain content filters together in an ordered list, and would use that to wrap any of the complicated filtering that needed to be done... but I'd make another tag - probably in the cmsfn tag library that would create functions to instantiate contentFilters of various types - and make a node-based contentFilter that would be constructed something like this: ${cmsfn:nodePropertyContentFilter ("hideInNav")} which would create a contentNodeFilter for you..

you could have an overloaded one that would take multilple arguments for maximum flexibility - ${cmsfn:nodePropertyContentFilter ("nodeName", "nodePropertyContentFilter.EXISTS", "accept")} (i.e. if the node exists, doesn't exist, has a specific value... or whatever kind of settings you wanted to set for that one - and then a behavior of "accept" or "reject" (default to accept, and overload it with that parameter as optional)....

To me, this would make the filtering behavior of the SimpleNavigation tag much more powerful - but perhaps at the cost of ease of use? - I suppose the old method signature could be left in there and it could just internally rewire itself to use the new contentFilter-based methodology...

I submitted a patch a while back that allows you to pass a contentFilter into the simpleNavigation. At the time I wrote it, I had it take a string value of a variable that is set in the pageContext - but I think I'll probably retool that patch and make it take just a straight-up contentFilter (which you can pass in via $ {filterVar} if you had one set in the page context that you created via a scriptlet or something) - you could easily create a content filter that would check a node property and reject all content that had a certain node set - this is how it should probably be done anyway.

Ryan


On Mar 21, 2008, at 2:34 PM, Thomas Martin wrote:

Hi List

I've got a short question:

when I use cmsu:simpleNavigation and set expandAll to true in order to display a sitemap it seems to ignore hideInNav flagged pages.

I tried with the default "hideInNav" and setting a custom nodeData and passing its name. But supposed hidden pages always show up.

Is it a bug or a feature?

Using CE 3.5.4

Thanks for any enlightenment!


The Easter Bunny ; )

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to