Module: Pageflow::HreflangLinksHelper
- Includes:
- SocialShareHelper
- Defined in:
- app/helpers/pageflow/hreflang_links_helper.rb
Overview
Helpers to render alternate links to translations of an entry.
Instance Method Summary collapse
-
#hreflang_link_tags_for_entry(entry) ⇒ Object
Render alternate links to all published entries that have been marked as translations of the given entry.
Methods included from SocialShareHelper
#social_share_entry_description, #social_share_entry_image_tags, #social_share_entry_url, #social_share_meta_tags_for, #social_share_normalize_protocol, #social_share_page_description, #social_share_page_title, #social_share_page_url
Methods included from RevisionFileHelper
Methods included from PagesHelper
#page_css_class, #page_default_content, #page_has_content, #page_header, #page_media_breakpoints, #page_navigation_css_class, #page_print_image, #page_text, #page_thumbnail_file, #page_thumbnail_image_class, #page_thumbnail_url, #render_page_template, #shadow_div
Methods included from EntriesHelper
#entry_css_class, #entry_file_rights, #entry_global_links, #entry_header_css_class, #entry_mobile_navigation_pages, #entry_privacy_link_url, #entry_stylesheet_link_tag, #entry_summary, #entry_theme_stylesheet_link_tag, #pretty_entry_title, #pretty_entry_url
Instance Method Details
#hreflang_link_tags_for_entry(entry) ⇒ Object
Render alternate links to all published entries that have been marked as translations of the given entry.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/pageflow/hreflang_links_helper.rb', line 10 def (entry) safe_join( translations_for_hreflang_links(entry).each_with_object([]) do |translation, links| links << hreflang_link_tag(translation) if translation.default_translation? links << hreflang_link_tag(translation, hreflang: 'x-default') end end ) end |