Class: Panda::CMS::TextComponent
- Inherits:
-
Panda::Core::Base
- Object
- Panda::Core::Base
- Panda::CMS::TextComponent
- Defined in:
- app/components/panda/cms/text_component.rb
Overview
Text component for editable plain text content
Constant Summary collapse
- KIND =
"plain_text"
Instance Attribute Summary collapse
-
#plain_text ⇒ Object
Returns the value of attribute plain_text.
Instance Method Summary collapse
Instance Attribute Details
#plain_text ⇒ Object
Returns the value of attribute plain_text.
16 17 18 |
# File 'app/components/panda/cms/text_component.rb', line 16 def plain_text @plain_text end |
Instance Method Details
#before_template ⇒ Object
32 33 34 |
# File 'app/components/panda/cms/text_component.rb', line 32 def before_template prepare_content end |
#view_template ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/components/panda/cms/text_component.rb', line 18 def view_template return unless @content # Russian doll caching: Cache component output at block_content level # Only cache in non-editable mode (public-facing pages) if should_cache? raw cache_component_output else render_content end rescue => e handle_error(e) end |