Class: Pageflow::InternalLinks::GridHelper::Grid
- Inherits:
-
Struct
- Object
- Struct
- Pageflow::InternalLinks::GridHelper::Grid
- Defined in:
- app/helpers/pageflow/internal_links/grid_helper.rb
Instance Attribute Summary collapse
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#page_links ⇒ Object
Returns the value of attribute page_links.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
Instance Attribute Details
#layout ⇒ Object
Returns the value of attribute layout
10 11 12 |
# File 'app/helpers/pageflow/internal_links/grid_helper.rb', line 10 def layout @layout end |
#page_links ⇒ Object
Returns the value of attribute page_links
10 11 12 |
# File 'app/helpers/pageflow/internal_links/grid_helper.rb', line 10 def page_links @page_links end |
#template ⇒ Object
Returns the value of attribute template
10 11 12 |
# File 'app/helpers/pageflow/internal_links/grid_helper.rb', line 10 def template @template end |
Instance Method Details
#item(position) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/helpers/pageflow/internal_links/grid_helper.rb', line 15 def item(position) page_link = page_links_by_position[position.to_i] || PageLink.null template.content_tag(:li, page_link.target_page ? thumbnail_link(page_link, hero?(position)) : '', :data => {:reference_key => position}, :class => page_link.target_page ? 'title_hover' : 'title_hover empty') end |
#render ⇒ Object
11 12 13 |
# File 'app/helpers/pageflow/internal_links/grid_helper.rb', line 11 def render template.render('pageflow/internal_links/grid/grid', grid: self) end |