Module: PagesCore::ApplicationHelper
- Includes:
- AttachmentsHelper, HeadTagsHelper, ImagesHelper, MetaTagsHelper, OpenGraphTagsHelper, PagePathHelper
- Included in:
- ApplicationHelper, FrontendController
- Defined in:
- app/helpers/pages_core/application_helper.rb
Instance Method Summary collapse
Methods included from PagePathHelper
Methods included from OpenGraphTagsHelper
#open_graph_properties, #open_graph_tags
Methods included from MetaTagsHelper
#default_meta_image, #default_meta_image?, #meta_description, #meta_description?, #meta_image, #meta_image?, #meta_keywords, #meta_keywords?
Methods included from ImagesHelper
#dynamic_image_tag, #image_caption, #image_figure, #original_dynamic_image_tag, #picture, #picture_tag, #uncropped_dynamic_image_tag
Methods included from HeadTagsHelper
#document_title, #document_title?, #feed_tags, #head_tag, #rss_link_tag
Methods included from AttachmentsHelper
#attachment_path, #download_attachment_path, #page_file_path
Instance Method Details
#page_link(page, options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/helpers/pages_core/application_helper.rb', line 14 def page_link(page, = {}) link_locale = [:locale] || locale page.localize(link_locale) do |p| title = [:title] || p.name.to_s return title unless () link_to(title, page_link_path(link_locale, p), class: [:class]) end end |
#unique_page(page_name) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'app/helpers/pages_core/application_helper.rb', line 24 def unique_page(page_name, &) page = Page.where(unique_name: page_name).first if page && block_given? output = capture(page.localize(content_locale), &) concat(output) end page&.localize(content_locale) end |