Opened 13 years ago

Closed 13 years ago

#3701 closed enhancement (fixed)

Allow setting an attribute so content can be displayed when layers don't have query results.

Reported by: sdlime Owned by: jmckenna
Priority: normal Milestone: 6.0 release
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords: templates
Cc: havatv

Description

Need to add an attribute to the [resultset ...] tag so that we can display something if a layer doesn't have any results. For example we might output an empty object for JSON output...

Steve

Change History (3)

comment:1 by sdlime, 13 years ago

Component: MapServer C LibraryMapServer Documentation
Owner: changed from sdlime to jmckenna

Added in r11026, also added to a template test in msautotest (query/template.map) that I'll commit soon. Moving to documentation component. -Steve

comment:2 by sdlime, 13 years ago

Oops, syntax is like so:

[resultset layer="foo" nodata="layer foo has no results available"]
  [feature]...[/feature]
[/resultset]

Normal operation would be to output with nothing for this block if layer foo had no results (e.g. nodata="").

Steve

comment:3 by havatv, 13 years ago

Cc: havatv added
Resolution: fixed
Status: newclosed

Fixed in 6.0 and trunk documentation in r12651. Updated template_output with nodata as an attribute to resultset. Also modified the formatting (so the nodata changes will be a bit difficult to find..., sorry).

Note: See TracTickets for help on using tickets.