lib/locomotive/mounter/reader/file_system/pages_reader.rb
# Tell is a page described by its fullpath is a sub page of a parent page
# also described by its fullpath
#
# @param [ String ] fullpath The full path of the page to test
# @param [ String ] parent_fullpath The full path of the parent page
#
# @return [ Boolean] True if the page is a sub page of the parent one
#
Tell is a page described by its fullpath is a sub page of a parent page
also described by its fullpath
Tell is a page described by its fullpath is a sub page of a parent page also described by its fullpath
def is_subpage_of?(page, parent)
            return false if %w(index 404).include?(page._fullpath)
            return true if parent._fullpath == 'index' && page._fullpath.split('/').size == 1
            File.dirname(page._fullpath.dasherize) == parent._fullpath.dasherize
          end
def is_subpage_of? ( page , parent ) return false if %w( index 404 ) . include? ( page . _fullpath ) return true if parent . _fullpath == 'index' && page . _fullpath . split ( '/' ) . size == 1 File . dirname ( page . _fullpath . dasherize ) == parent . _fullpath . dasherize end
Tell is a page described by its fullpath is a sub page of a parent page
also described by its fullpath
Tell is a page described by its fullpath is a sub page of a parent page also described by its fullpath
True if the page is a sub page of the parent one
True if the page is a sub page of the parent one
 Boolean
page
<not_specific>
parent
<not_specific>
<not_specific>
parent_fullpath The full path of the parent page
parent_fullpath The full path of the parent page