Table of Contents

Class HtmlGeneratorList

Namespace
SunamoHtml.Generators
Assembly
SunamoHtml.dll

EN: Static class for generating HTML lists (UL/OL) with anchors and duplicate checking. CZ: Statická třída pro generování HTML seznamů (UL/OL) s odkazy a kontrolou duplicit.

public static class HtmlGeneratorList
Inheritance
HtmlGeneratorList
Inherited Members

Methods

GetFor(string, IList<string>, IList<string>?, bool, string)

Generates an HTML list (UL or OL) with anchor links. If titles parameter is null, uses items for both href values and display text.

public static string GetFor(string baseAnchor, IList<string> relativeAnchors, IList<string>? titles, bool isCheckDuplicates, string tag)

Parameters

baseAnchor string

Base URL to prepend to each anchor href.

relativeAnchors IList<string>

List of items to use as anchor href values.

titles IList<string>

List of titles to display as link text. If null, uses items.

isCheckDuplicates bool

Whether to skip duplicate items.

tag string

The HTML tag to use for the list (ul or ol).

Returns

string

HTML string with list and anchors.

Ol(string, IList<string>, IList<string>, bool)

Generates an ordered list (OL) with anchor links.

public static string Ol(string baseAnchor, IList<string> relativeAnchors, IList<string> titles, bool isCheckDuplicates)

Parameters

baseAnchor string

Base URL to prepend to each anchor href.

relativeAnchors IList<string>

List of items to use as anchor href values.

titles IList<string>

List of titles to display as link text.

isCheckDuplicates bool

Whether to skip duplicate items.

Returns

string

HTML string with OL and anchors.

Ul(string, IList<string>, IList<string>, bool)

Generates an unordered list (UL) with anchor links.

public static string Ul(string baseAnchor, IList<string> relativeAnchors, IList<string> titles, bool isCheckDuplicates)

Parameters

baseAnchor string

Base URL to prepend to each anchor href.

relativeAnchors IList<string>

List of items to use as anchor href values.

titles IList<string>

List of titles to display as link text.

isCheckDuplicates bool

Whether to skip duplicate items.

Returns

string

HTML string with UL and anchors.