Module: Nesta::Plugin::RelatedByCategory::Helpers

Defined in:
lib/nesta-plugin-related-by-category/init.rb

Instance Method Summary collapse

Instance Method Details

Returns:

  • (Boolean)


6
7
8
# File 'lib/nesta-plugin-related-by-category/init.rb', line 6

def has_related_articles?(page)
  !(Nesta::Plugin::RelatedByCategory.articles_through_categories(page).empty?)
end


10
11
12
# File 'lib/nesta-plugin-related-by-category/init.rb', line 10

def related_by_category(page, number=3)
 Nesta::Plugin::RelatedByCategory.for_page(page, number)
end