<koken:include file="inc/header.html" />

<div id="content">

	<!-- Load this template's source data (favorites) and limit for pagination -->
	<koken:load limit="50">

		<div class="lcol">

			<!-- Loop over all favorited content, display info about each, link to content.lens -->
			<koken:loop>

				<h2>
					<koken:link title="View {{ content.title | content.filename }}">
						{{ content.title | content.filename }}
					</koken:link>
				</h2>

				<koken:link title="View {{ content.title | content.filename }}">
					<koken:img />
				</koken:link>

				<p>
					{{ content.caption }}
				</p>

				<p>
					<strong>Uploaded:</strong> {{ content.uploaded_on }}
				</p>

			</koken:loop>

			<!-- Display pagination links -->
			<p>
				<koken:include file="inc/pagination.html" />
			</p>

		</div> <!-- close .lcol -->

		<div class="rcol">

			<!-- Links to view content by publish date in archive.contents.lens -->
	       <h3>View {{ labels.content.plural case="lower" }} by date</h3>
	        <koken:dates limit_to="content">
	          <koken:select label="Select month" />
	        </koken:dates>

	       <!-- Links to view content by category in archive.contents.lens -->
	        <koken:categories limit_to="content" order_by="content_count">
	          <h3>View {{ labels.content.plural case="lower" }} by {{ labels.category.singular case="lower" }}</h3>
	          <koken:loop>
	            <koken:link title="View all {{ labels.content.plural case='lower' }} in {{ category.title }}">
	            {{ category.title }} ({{ category.counts.total }})
	            </koken:link>
	            <br>
	          </koken:loop>
	        </koken:categories>

	        <!-- Links to view content by tag in archive.contents.lens -->
	         <koken:tags limit_to="content" order_by="content_count">
	         <h3>View {{ labels.content.plural case="lower" }} by {{ labels.tag.singular case="lower" }}</h3>
	         <koken:loop>
	            <koken:link title="View all {{ labels.content.plural case='lower' }} in #{{ tag.title }}">
	              {{ tag.title }} ({{ tag.counts.total }})
	            </koken:link>
	            <br>
	         </koken:loop>
	       </koken:tags>

		</div> <!-- close .rcol -->

		<!-- Fallback content if no data was loaded by koken:load -->
		<koken:else>

			<!-- Display fallback message in Site editor only -->
			<koken:note>
				No favorites found. Assign some in the Library.
			</koken:note>

	</koken:load>

</div> <!-- close #content -->

<koken:include file="inc/footer.html" />