Sha256: 447c9cbf2cd6146bbbfb7af899621e170ff7d0cceb1eb7d003cf61cfa1408da3

Contents?: true

Size: 752 Bytes

Versions: 76

Compression:

Stored size: 752 Bytes

Contents

module Pageflow
  module EmbedCodeHelper
    def embed_code_entry_snippet(entry)
      Pageflow::EmbedCodeHelper::EntrySnippet.new(pageflow, entry)
    end

    class EntrySnippet
      def initialize(routes, entry)
        @routes = routes
        @entry = entry
      end

      def call
        %'<iframe src="#{url(entry)}" scrolling="no" allowfullscreen></iframe>'
      end

      private

      attr_reader :routes, :entry

      def url(entry)
        routes.entry_embed_url(entry, entry_embed_url_options(entry))
      end

      def entry_embed_url_options(entry)
        options = Pageflow.config.entry_embed_url_options
        options = options.call(entry.theming) if options.respond_to?(:call)
        options
      end
    end
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
pageflow-14.5.2 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.6.1 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.6.0 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.5.0 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.4.0 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.3.0 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.2.2 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.2.1 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.2.0 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.2 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.1 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0.rc0 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0.beta6 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0.beta5 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0.beta4 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0.beta3 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0.beta2 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.1.0.beta1 app/helpers/pageflow/embed_code_helper.rb
pageflow-15.0.2 app/helpers/pageflow/embed_code_helper.rb