Original File grouped-archive.cshtml
ArchiveSources: posts/*
ArchiveKey: Colors
---
<p>
This groups the archive using the "Colors" metadata property. Note how if <code>GroupKey</code> is defined for the document
we can assume it's the index for a given color, but if it's not then it's the index for all colors.
</p>
@if (Model.ContainsKey(Keys.GroupKey))
{
// An individual color
<h3>@Model.GetString(Keys.GroupKey)</h3>
@foreach (IDocument document in Model.GetChildren())
{
<h5>@Html.DocumentLink(document)</h5>
<p><b>Colors:</b> @string.Join(", ", document.GetList<string>("Colors"))</p>
@Html.Raw(document.GetString(Keys.Excerpt))
}
}
else
{
// The main color index
<h3>All Colors</h3>
@foreach (IDocument document in Model.GetChildren())
{
<h5>@Html.DocumentLink(document)</h5>
}
}
This groups the archive using the "Colors" metadata property. Note how if GroupKey
is defined for the document
we can assume it's the index for a given color, but if it's not then it's the index for all colors.
Orange
Orange
Colors: Orange
The orange is the fruit of various citrus species in the family Rutaceae (see list of plants known as orange); it primarily refers to Citrus × sinensis,[1] which is also called sweet orange, to distinguish it from the related Citrus × aurantium, referred to as bitter orange. The sweet orange reproduces asexually (apomixis through nucellar embryony); varieties of sweet orange arise through mutations.[2][3][4][5]
Mango
Colors: Orange
A mango is a stone fruit produced from numerous species of tropical trees belonging to the flowering plant genus Mangifera, cultivated mostly for their edible fruit. Most of these species are found in nature as wild mangoes. The genus belongs to the cashew family Anacardiaceae. Mangoes are native to South Asia,[1][2] from where the "common mango" or "Indian mango", Mangifera indica, has been distributed worldwide to become one of the most widely cultivated fruits in the tropics. Other Mangifera species (e.g. horse mango, Mangifera foetida) are grown on a more localized basis.