Module: CamaleonCms::ContentHelper

Included in:
CamaleonController
Defined in:
app/helpers/camaleon_cms/content_helper.rb

Instance Method Summary collapse

Instance Method Details

#cama_content_after_drawObject

draw all after contents registered by cama_content_append



29
30
31
32
33
# File 'app/helpers/camaleon_cms/content_helper.rb', line 29

def cama_content_after_draw
  @_after_content.join('')
rescue StandardError
  ''
end

#cama_content_append(content) ⇒ Object

append content for admin or frontend (before </body>) sample: cama_content_prepend(<div>my after content</div>)



17
18
19
# File 'app/helpers/camaleon_cms/content_helper.rb', line 17

def cama_content_append(content)
  @_after_content << content
end

#cama_content_before_drawObject

draw all before contents registered by cama_content_prepend



22
23
24
25
26
# File 'app/helpers/camaleon_cms/content_helper.rb', line 22

def cama_content_before_draw
  @_before_content.join('')
rescue StandardError
  ''
end

#cama_content_initObject

initialize content variables



4
5
6
7
# File 'app/helpers/camaleon_cms/content_helper.rb', line 4

def cama_content_init
  @_before_content = []
  @_after_content = []
end

#cama_content_prepend(content) ⇒ Object

prepend content for admin or frontend (after <body>) sample: cama_content_prepend(<div>my prepend content</div>)



11
12
13
# File 'app/helpers/camaleon_cms/content_helper.rb', line 11

def cama_content_prepend(content)
  @_before_content << content
end