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



26
27
28
# File 'app/helpers/camaleon_cms/content_helper.rb', line 26

def cama_content_after_draw
  @_after_content.join("") rescue ""
end

#cama_content_append(content) ⇒ Object

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



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

def cama_content_append(content)
  @_after_content << content
end

#cama_content_before_drawObject

draw all before contents registered by cama_content_prepend



21
22
23
# File 'app/helpers/camaleon_cms/content_helper.rb', line 21

def cama_content_before_draw
  @_before_content.join("") rescue ""
end

#cama_content_initObject

initialize content variables



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

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>)



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

def cama_content_prepend(content)
  @_before_content << content
end