Changes

Jump to: navigation, search

Umlaut partial html API

1,880 bytes added, 16:02, 2 October 2008
Response
This block will only be present when <complete> is 'false'. It provides information on completion status, and how to refresh the response for more information prepared in the background. For more information, see the documentation in [[Umlaut full API#.3Cin_progress.3E]], the block is the same here.
 
== <html_section> ==
 
What you really want is contained in 0 or more html_section blocks. Each one contains some generated HTML, along with some metadata about it. The id attribute of <html_section> tells you which section it is. What sections exist is configured in Umlaut in the "partial_html_map" configuration param, which by default is set to the "bg_update_map" config params :divs key. To see the sections in a default Umlaut installation, see: [http://umlaut.rubyforge.org/svn/trunk/config/environment.rb environment.rb in svn], look for bg_update_map. The :divs key of the hash there is an array of hashes, each individual hash has a :div_id key that corresponds to the html_sections id in this api response. For Umlaut developers, the :partial key tells you what Rails partial is used to generate this section.
 
The sections and their contents can be customized by the Umlaut administrator by changing the partial_html_map config (and/or the bg_update_map config).
 
Inside an html_section in the response there is a bit of metadata for you:
 
=== <included_services> ===
 
What ServiceTypeValues are included in this html section. This specifies what type of data is in this block. For a list of possible ServiceTypeValues in a default Umlaut configuration, see [http://umlaut.rubyforge.org/svn/trunk/db/orig_fixed_data/service_type_values.yml service_type_values.yml] in umlaut SVN.
 
=== <service_load_complete> ===
 
true or false. False if this html_section might change as more background services run, true if this html_section is completely finished.
 
=== <response_count> ===
 
How many Umlaut response objects were used to generate this block? Can be useful if you want to do something different with 0 (no content) vs. non-0 (content).
 
=== <html_content> ===
 
The actual html content. It is of course standardly XML-escaped in XML, or json-escaped in json.
Anonymous user

Navigation menu