moved to the listed methods in the nav
This commit is contained in:
parent
974923b929
commit
7bce392e56
@ -106,7 +106,7 @@ module Locomotive
|
||||
|
||||
# Determines whether or not a page should be a part of the menu
|
||||
def include_page?(page)
|
||||
if page.unlisted? || page.templatized? || !page.published?
|
||||
if !page.listed? || page.templatized? || !page.published?
|
||||
false
|
||||
elsif @options[:exclude]
|
||||
(page.fullpath =~ @options[:exclude]).nil?
|
||||
|
@ -16,7 +16,7 @@ describe Locomotive::Liquid::Tags::Nav do
|
||||
Page.new(:title => 'Child #2.2', :fullpath => 'child_2/sub_child_2', :slug => 'sub_child_2', :published => true),
|
||||
Page.new(:title => 'Unpublished #2.2', :fullpath => 'child_2/sub_child_unpublishd_2', :slug => 'sub_child_unpublished_2', :published => false),
|
||||
Page.new(:title => 'Templatized #2.3', :fullpath => 'child_2/sub_child_template_3', :slug => 'sub_child_template_3', :published => true, :templatized => true),
|
||||
Page.new(:title => 'Unlisted #2.4', :fullpath => 'child_2/sub_child_unlisted_4', :slug => 'sub_child_unlisted_4', :published => true, :unlisted => true)
|
||||
Page.new(:title => 'Unlisted #2.4', :fullpath => 'child_2/sub_child_unlisted_4', :slug => 'sub_child_unlisted_4', :published => true, :listed => false)
|
||||
]
|
||||
@home.children.last.stubs(:children_with_minimal_attributes).returns(other_children)
|
||||
@home.children.last.stubs(:children).returns(other_children)
|
||||
|
Loading…
Reference in New Issue
Block a user