Class: Fabulator::Radiant::Lib
- Inherits:
-
TagLib
- Object
- TagLib
- Fabulator::Radiant::Lib
- Defined in:
- lib/fabulator/radiant/actions.rb
Class Method Summary collapse
Class Method Details
.page_to_node(p, ctx) ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/fabulator/radiant/actions.rb', line 76 def self.page_to_node(p, ctx) return nil if p.nil? p_node = ctx.anon_node(p.id, [ RADIANT_NS, 'page' ]) p_node.name = p.slug p.parts.each do |pp| #pp_node = ctx.anon_node(pp.content, [ RADIANT_NS, 'page-part' ]) #pp_node.name = pp.name #pp_node.set_attribute('filter', pp.filter) #p_node.set_attribute(pp.name, pp_node) p_node.set_attribute(pp.name, pp.content) end p_node.set_attribute('title', p.title) p_node.set_attribute('breadcrumb', p.) p_node.set_attribute('description', p.description) p_node.set_attribute('keywords', p.keywords) #p_node.set_attribute('layout', p.layout) #p_node.set_attribute('page-type', p.page_type) #p_node.set_attribute('status', p.status) p_node end |