Class: Webgen::Tag::Sitemap

Inherits:
Object
  • Object
show all
Includes:
Base, WebsiteAccess
Defined in:
lib/webgen/tag/sitemap.rb

Overview

Generates a sitemap. The sitemap contains the hierarchy of all pages on the web site.

Instance Method Summary collapse

Methods included from WebsiteAccess

included, website

Methods included from Base

#create_params_hash, #create_tag_params, #param, #set_params

Methods included from Loggable

#log, #puts

Instance Method Details

#call(tag, body, context) ⇒ Object

Create the sitemap.



12
13
14
15
# File 'lib/webgen/tag/sitemap.rb', line 12

def call(tag, body, context)
  tree = website.blackboard.invoke(:create_sitemap, context.dest_node, context.content_node.lang, @params)
  (tree.children.empty? ? '' : output_sitemap(tree, context))
end