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
baseAnchorstringBase URL to prepend to each anchor href.
relativeAnchorsIList<string>List of items to use as anchor href values.
titlesIList<string>List of titles to display as link text. If null, uses items.
isCheckDuplicatesboolWhether to skip duplicate items.
tagstringThe 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
baseAnchorstringBase URL to prepend to each anchor href.
relativeAnchorsIList<string>List of items to use as anchor href values.
titlesIList<string>List of titles to display as link text.
isCheckDuplicatesboolWhether 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
baseAnchorstringBase URL to prepend to each anchor href.
relativeAnchorsIList<string>List of items to use as anchor href values.
titlesIList<string>List of titles to display as link text.
isCheckDuplicatesboolWhether to skip duplicate items.
Returns
- string
HTML string with UL and anchors.