Added "Enable Section Achors" configuration option.
This commit is contained in:
parent
84618e26e7
commit
947e8cdce0
26 changed files with 161 additions and 10 deletions
|
@ -871,13 +871,15 @@ namespace ScrewTurn.Wiki {
|
|||
/// <param name="buffer">The string builder.</param>
|
||||
/// <param name="id">The anchor ID.</param>
|
||||
private static void BuildHeaderAnchor(StringBuilder buffer, string id) {
|
||||
buffer.Append(@"<a class=""headeranchor"" id=""");
|
||||
buffer.Append(id);
|
||||
buffer.Append(@""" href=""#");
|
||||
buffer.Append(id);
|
||||
buffer.Append(@""" title=""");
|
||||
buffer.Append(Exchanger.ResourceExchanger.GetResource("LinkToThisSection"));
|
||||
buffer.Append(@""">¶</a>");
|
||||
if(Settings.EnableSectionAnchors) {
|
||||
buffer.Append(@"<a class=""headeranchor"" id=""");
|
||||
buffer.Append(id);
|
||||
buffer.Append(@""" href=""#");
|
||||
buffer.Append(id);
|
||||
buffer.Append(@""" title=""");
|
||||
buffer.Append(Exchanger.ResourceExchanger.GetResource("LinkToThisSection"));
|
||||
buffer.Append(@""">¶</a>");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -696,6 +696,18 @@ namespace ScrewTurn.Wiki {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to display section anchors.
|
||||
/// </summary>
|
||||
public static bool EnableSectionAnchors {
|
||||
get {
|
||||
return GetBool(Provider.GetSetting("EnableSectionAnchors"), true);
|
||||
}
|
||||
set {
|
||||
Provider.SetSetting("EnableSectionAnchors", PrintBool(value));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to disable the Breadcrumbs Trail.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue