Helpers - adamtao/thebigfork_themes GitHub Wiki

The HTML templates used by TheBigFork themes include several “Helper” methods to generate standard content provided by TheBigFork. Helper methods appear between <%= %> brackets. The following explanations were extracted from TheBigFork code.

<%= footer_ad_if_needed %>

If the given Website is part of a MembershipPlan which is ad supported (usually a free plan), then show a footer ad for TBF encouraging other restaurant owners to check out TBF offerings.

    <%= footer_ad_if_needed %>

<%= logo %>

Show the logo for the given Website. Pass in an optional size. Returns HTML for the logo image (if any), or an h1 title with the website name. Either will link back to the site root. (“/”)

    <%= logo("small") %> or simply <%= logo %>

    #  Available (optional) sizes: 
    #   :original => whatever was uploaded
    #   :large => "550x370", 
    #   :medium => "480x360", 
    #   :small => "240x180" (default)
    #   :thumb => "100x100", 
    #   :tiny => "64x64", 
    #   :tiny_square => "64x64#"

<%= main_navigation %>

Returns a navigation unit for the given Website. This returns an HTML5 “nav” container with a traditional “ul” “li” “a” set of tags inside—each “li” “a” object links to some page of the site.

    <%= main_navigation %>

<%= footer_navigation %>

Returns a navigation unit for the given Website. This returns an HTML5 “nav” container with a traditional “ul” “li” “a” set of tags inside—each “li” “a” object links to some page of the site. The elements themselves are the same as the main_navigation, with the addition of a link to the auto-generated sitemap.xml.

    <%= footer_navigation %>

<%= website_slideshow %>

Renders a slideshow. The current Website must have at least one “slide.” If there is only one slide, then it is rendered alone without any transitions.

    <%= website_slideshow(:duration => 7000, :transition => 'fade') %>
    #  (all options are, well, optional.)

<%= render_page_content %>

Renders page content safely surrounded by a DIV tag with a class=“page_content” (defaults to empty rather than throwing an error)

    <%= render_page_content(@website_page) %>
    # @website_page is not optional. It should already be loaded by
    # TheBigFork before calling this method.

<%= render_ad_support %>

Renders a 486×60 ad unit on a page if their account is ad supported.

    <%= render_ad_support %>
⚠️ **GitHub.com Fallback** ⚠️