Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (47 sloc) 1.39 KB
Title: Shortcodes
NoSidebar: false
---
@section Search {
@Html.Partial("_ShortcodesSearch")
}
<p>
Shortcodes are small but powerful macros that can generate content in your documents.
<a href="/docs/concepts/shortcodes">Click here to learn more about shortcodes in general.</a>
</p>
<div class="box">
<div class="box-body no-padding table-responsive">
<table class="table table-striped table-hover two-cols-alt">
<tbody>
@foreach(IDocument childDoc in Documents.FromPipeline("Shortcodes")
.OrderBy(x => x.String("DisplayName")))
{
<tr>
<td>
<strong><a href="@Context.GetLink(childDoc)">@(childDoc.String("DisplayName"))</a></strong>
@{
IDocument containingNamespace = childDoc.Get<IDocument>("ContainingNamespace");
if(containingNamespace != null)
{
string package = string.Join(".", containingNamespace.String("DisplayName").Split('.').Take(2));
if(!package.StartsWith("Wyam.Core"))
{
<small><span class="label label-default">@package</span></small>
}
}
}
</td>
<td>
@{
string summary = childDoc.String("Summary");
if(!string.IsNullOrWhiteSpace(summary))
{
@Html.Raw(summary)
}
}
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
You can’t perform that action at this time.