Firesphere / silverstripe-newsmodule

Silverstripe 3 Newsmodule
BSD 2-Clause "Simplified" License
24 stars 10 forks source link

Prevent news items (child pages) from appearing in Menu #131

Closed birwin79 closed 10 years ago

birwin79 commented 10 years ago

Hello,

Thanks for making this module available!

Since my site is going to have over a hundred articles, I am trying to prevent news items from appearing in my top navigation Menu(1) as child pages. I have tried to use conditionals at the template level without any luck. Is there a setting or something I could have missed?

Best Regards

Firesphere commented 10 years ago

To prevent any items showing up, you can exclude the children for the NewsHolderPage like this: <% if not $ClassName = 'NewsHolderPage' %> <% loop $Children %> Or, you could limit to e.g. the latest 10 items like this: <% loop $Children.Limit(10) %>