module Webgen::Tag::Menu
Generates a menu that can be extensively configured by using the available Webgen::NodeFinder options.
Public Class Methods
call(tag, body, context)
click to toggle source
Generate the menu.
# File lib/webgen/tag/menu.rb, line 12 def self.call(tag, body, context) options = context[:config]['tag.menu.options'] context[:nodes] = context.website.ext.node_finder.find(options, context.content_node) context.website.ext.item_tracker.add(context.dest_node, :nodes, :node_finder_option_set, {:opts => options, :ref_alcn => context.content_node.alcn}, context[:config]['tag.menu.tracking_style']) if context[:nodes].empty? '' else Webgen::Tag.render_tag_template(context, "menu") end end