Module: Integral::ApplicationHelper
- Includes:
- BlogHelper, GalleryHelper, SocialHelper, SupportHelper
- Defined in:
- app/helpers/integral/application_helper.rb
Overview
Base Frontend Helper
Instance Method Summary collapse
-
#google_tag_manager(type = :script) ⇒ String
Frontend Google Tag Manager Snippet.
-
#main_menu_list ⇒ Integal::List
Main menu list as defined in settings area.
- #render_breadcrumbs? ⇒ Boolean
-
#render_content(content) ⇒ String
Processed HTML.
-
#render_json_ld ⇒ String
Javascript snippet containing LD-JSON.
-
#render_list(list, opts = {}) ⇒ String
HTML generated by rendering list.
-
#site_title ⇒ String
Configurable Website title.
Methods included from GalleryHelper
#render_gallery, #render_thumb_gallery
Methods included from BlogHelper
#display_most_read_posts_widget?, #display_newsletter_signup_widget?, #display_popular_posts_widget?, #display_recent_posts_widget?, #display_share_widget?, #featured_categories, #most_read_posts, #render_post_as_json_ld, #render_posts_as_json_ld
Methods included from SocialHelper
#facebook_share_url, #facebook_url, #github_url, #instagram_url, #linkedin_share_url, #linkedin_url, #twitter_share_url, #twitter_url, #youtube_url
Methods included from SupportHelper
#anchor_to, #display_media_query_indicator?, #method_missing, #render_flashes, #respond_to?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Integral::SupportHelper
Instance Method Details
#google_tag_manager(type = :script) ⇒ String
Frontend Google Tag Manager Snippet
50 51 52 |
# File 'app/helpers/integral/application_helper.rb', line 50 def google_tag_manager(type = :script) GoogleTagManager.render(Settings.google_tag_manager_id, type) end |
#main_menu_list ⇒ Integal::List
Returns main menu list as defined in settings area.
39 40 41 42 |
# File 'app/helpers/integral/application_helper.rb', line 39 def id = Integral::Settings.send('main_menu_list_id') @main_menu_list ||= Integral::List.find_by_id(id) end |
#render_breadcrumbs? ⇒ Boolean
44 45 46 |
# File 'app/helpers/integral/application_helper.rb', line 44 def true end |
#render_content(content) ⇒ String
Returns Processed HTML. Any Integral Widgets placeholders replaced with content.
19 20 21 |
# File 'app/helpers/integral/application_helper.rb', line 19 def render_content(content) Integral::ContentRenderer.render(content) end |
#render_json_ld ⇒ String
Returns Javascript snippet containing LD-JSON.
10 11 12 13 14 |
# File 'app/helpers/integral/application_helper.rb', line 10 def render_json_ld content_tag 'script', type: 'application/ld+json' do yield.to_json.html_safe end end |
#render_list(list, opts = {}) ⇒ String
Returns HTML generated by rendering list.
30 31 32 33 34 35 36 |
# File 'app/helpers/integral/application_helper.rb', line 30 def render_list(list, opts = {}) opts.reverse_merge!( renderer: Integral::ListRenderer ) opts[:renderer].render(list, opts).html_safe end |
#site_title ⇒ String
Returns Configurable Website title.
55 56 57 |
# File 'app/helpers/integral/application_helper.rb', line 55 def site_title Settings.website_title end |