Module: CamaleonCms::ContentHelper

Included in:
RuntimeHtmlContentConcern
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



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

def cama_content_after_draw
  cama_content_state[:after_content].join('')
rescue StandardError
  ''
end

#cama_content_append(content) ⇒ Object

append content for admin or frontend (before ) sample: cama_content_prepend(

my after content
)



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

def cama_content_append(content)
  cama_content_state[:after_content] << content
end

#cama_content_before_drawObject

draw all before contents registered by cama_content_prepend



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

def cama_content_before_draw
  cama_content_state[:before_content].join('')
rescue StandardError
  ''
end

#cama_content_initObject

initialize content variables



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

def cama_content_init
  state = cama_content_state
  state[:before_content] = []
  state[:after_content] = []
end

#cama_content_prepend(content) ⇒ Object

prepend content for admin or frontend (after ) sample: cama_content_prepend(

my prepend content
)



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

def cama_content_prepend(content)
  cama_content_state[:before_content] << content
end