WebMake: Documentation: The <content> Tag

WebMake Documentation (version 1.2) | [ Back | Forward | Index | All In One ]

# The <content> Tag The <content> tag has one required attribute: its name, which is used to substitute in that section's text, by inserting it in other sections or out tags in a curly-bracket reference, like so: ${foo} The following attributes are supported. These can also be set using the <attrdefault> tag. format This allows the user to define what format the content is in. This allows markup languages other than HTML to be used; webmake will convert to HTML format, or other output formats, as required using the HTML::WebMake::FormatConvert module. The default value is "text/html". asis This will block any interpretation of content or URL references in the content item, until after it has been converted into HTML format. This is useful for POD documentation, which may be embedded inside a file containing other text; without "asis", the text would be scanned for content references before the POD converter stripped out the extraneous bits. The default value is "false". map Whether the content item should be mapped in a site map, or not. The default value is "true". up The name of the content item which is this content item's parent, in the site map. isroot Whether or not this content item is the root of the site map. The default value is "false". If you wish to define a number of content sections at once, they can be searched for and loaded en masse using the <contents> tag. Every content item can have metadata associated with it. See the metadata documentation for details. # Defining Content Items On-The-Fly The <{set}> processing instruction can be used to define small pieces of content on the fly, from within other content or <out> sections. In addition, Perl code can create content items using the set_content() function. # Using Content From Perl Code Perl code can obtain the text of content items using the get_content() function, and can treat content items as whitespace-separated lists using get_list(). In addition, each content item has a range of properties and associated metadata; the get_content_object() method allows Perl code to retrieve an object of type HTML::WebMake::Content representing the content item. ## Example
      <content name="foo" format="text/html">
      <em>This is a test.</em>
      </content>

      <content name="bar" format="text/et">
      Still Testing
      -------------

      So is this!
      </content>

WebMake Documentation (version 1.2) | [ Back | Forward | Index | All In One ]