<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<link rel="stylesheet" href="{{framework}}/default.css" type="text/css" charset="utf-8">
	<link rel="stylesheet" href="{{framework}}/screen.css" type="text/css" charset="utf-8" media="screen">
	<link rel="stylesheet" href="{{framework}}/print.css" type="text/css" charset="utf-8" media="print">
</head>

{{fscript
	cat := objectContext objectForEntityNamed:'Category' wherePrimaryKeyValueIs:categoryID.
	globals setCategory:cat.
	objs := objectContext objectsForEntityNamed:'Contact' qualifierLocum:'categoryID == $catID' bindings:#{'catID' -> categoryID}.
	globals setContacts:objs.
}}

<body>
	<h2>People with {{category.name}} category</h2>
	<table width="100%">
		<tr>
			<td width="40%">Name</td>
			<td width="40%">Email</td>
			<td width="30%">City</td>
		</tr>
		{{foreach contact contacts do}}
			<tr>
				<td width="40%"><a href="daylite4://ShowObject/Contact/{{contact.contactID}}">{{contact.cachedName}}</a></td>
				<td width="40%">{{contact.defaultEmailAddress.url}}</td>
				<td width="30%">{{contact.defaultGeoAddress.city}}</td>
			</tr>
		{{endforeach do}}
	</table>

	<div id="reportfooter">
	Generated by {{objectContext.user.contact.cachedName}} on {{date}}.		
	</div>

</body>
</html>