Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Hide in menu' option in CMS shouldn't also hide forums from forum list #79

Open
mandrew opened this issue May 19, 2014 · 3 comments
Open

Comments

@mandrew
Copy link
Contributor

mandrew commented May 19, 2014

Wondered why forums weren't showing and turned out that the function 'Forum' on ForumHolder was checking if 'ShowInMenus' => 1 which seemed weird to me.

What if I wanted to hide forums in the menu but show them in the forum list or vice versa? I think this decision shouldn't be made for you in the code, there should be an extra check box (probably in the settings area, next to the hide in menu option) to hide the forum from the forum list.

@tractorcow
Copy link
Collaborator

This is probably because Children is used to select children (which filters out menu-hidden items) where AllChildren should probably be used. It's a bit of a misnomer that Children assumes only menu-visible children, but that's the way it is. :)

@mandrew
Copy link
Contributor Author

mandrew commented May 19, 2014

No it first filters by ForumCategory and then a Forum::get() on CategoryID, ParentID and ShowInMenus and then a filterByCallback returning only the forums you can view

@camfindlay
Copy link
Contributor

@tractorcow , @mandrew is correct, in the Forum::forums() method it makes an explicit call via the ORM to Forum::get() and filters for 'ShowInMenus' => 1 in effect changing this setting in the CMS causes 2 things to happen, one of which (hiding the actual forum) may not be what the users actually wants (they might just want to hid from menu).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants