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

Already on GitHub? Sign in to your account

Only display the sidebar if it has some content #12

Merged
merged 1 commit into from Oct 24, 2011

Conversation

Projects
None yet
2 participants

etdsoft commented Oct 23, 2011

If we don't have content_for :index_items, then we can assume, we are not on a
guide page (e.g. we are on Credits we don't need a Chapters sidebar).

In addition to this, we let each page to provide content_for :sidebar in case
there is a need to provide custom content (e.g. in the index page, have some
special items on the sidebar).

If we don't have content_for either :index_items or :sidebar, we hide the
sidebar.

Only display the sidebar if it has some content
If we don't have content_for :index_items, then we can assume, we are not on a
guide page (e.g. we are on Credits we don't need a Chapters sidebar).

In addition to this, we let each page to provide content_for :sidebar in case
there is a need to provide custom content (e.g. in the index page, have some
special items on the sidebar).

If we don't have content_for either :index_items or :sidebar, we hide the
sidebar.

wagenet added a commit that referenced this pull request Oct 24, 2011

Merge pull request #12 from etdsoft/hide_chapters
Only display the sidebar if it has some content

@wagenet wagenet merged commit 6bdb5a8 into wycats:master Oct 24, 2011

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