Module: CamaleonCms::ContentHelper
- Included in:
- CamaleonController
- Defined in:
- app/helpers/camaleon_cms/content_helper.rb
Overview
Camaleon CMS is a content management system
Copyright (C) 2015 by Owen Peredo Diaz
Email: [email protected]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License (GPLv3) for more details.
Instance Method Summary collapse
-
#cama_content_after_draw ⇒ Object
draw all after contents registered by cama_content_append.
-
#cama_content_append(content) ⇒ Object
append content for admin or frontend (before </body>) sample: cama_content_prepend(<div>my after content</div>).
-
#cama_content_before_draw ⇒ Object
draw all before contents registered by cama_content_prepend.
-
#cama_content_init ⇒ Object
initialize content variables.
-
#cama_content_prepend(content) ⇒ Object
prepend content for admin or frontend (after <body>) sample: cama_content_prepend(<div>my prepend content</div>).
Instance Method Details
#cama_content_after_draw ⇒ Object
draw all after contents registered by cama_content_append
34 35 36 |
# File 'app/helpers/camaleon_cms/content_helper.rb', line 34 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>)
24 25 26 |
# File 'app/helpers/camaleon_cms/content_helper.rb', line 24 def cama_content_append(content) @_after_content << content end |
#cama_content_before_draw ⇒ Object
draw all before contents registered by cama_content_prepend
29 30 31 |
# File 'app/helpers/camaleon_cms/content_helper.rb', line 29 def cama_content_before_draw @_before_content.join("") rescue "" end |
#cama_content_init ⇒ Object
initialize content variables
11 12 13 14 |
# File 'app/helpers/camaleon_cms/content_helper.rb', line 11 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>)
18 19 20 |
# File 'app/helpers/camaleon_cms/content_helper.rb', line 18 def cama_content_prepend(content) @_before_content << content end |