Module: PagelimeControllerExtensions::InstanceMethods

Defined in:
lib/pagelime_rails.rb

Instance Method Summary collapse

Instance Method Details

#cms_process_rendered_bodyObject



126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/pagelime_rails.rb', line 126

def cms_process_rendered_body
  puts "PAGELIME CMS PLUGIN: Processing response body"
  if pagelime_environment_configured?
    # response contents loaded into a variable
    input_content = response.body
    page_path = request.path
    html = cms_process_html_block(page_path,input_content,false)
    # output the final content
    response.body = html
  else
    puts "PAGELIME CMS PLUGIN: Environment variables not configured"
  end
end