Created
October 13, 2017 04:44
-
-
Save BenGGolden/724260d650ef14c4729cafce75f26bfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class FluentTagBuilderHelperExtensions | |
{ | |
public static FluentTagBuilder Tag(this HtmlHelper helper, string tagName) | |
{ | |
return new FluentTagBuilder(tagName); | |
} | |
public static HtmlString DynamicPlaceholder(this SitecoreHelper sitecoreHelper, string placeholderName, | |
FluentTagBuilder chrome, int count = 1, int maxCount = 0, int seed = 0) | |
{ | |
return sitecoreHelper.DynamicPlaceholder(placeholderName, chrome.InnerBuilder, count, maxCount, seed); | |
} | |
public static HtmlString DynamicPlaceholder(this SitecoreHelper sitecoreHelper, string placeholderName, | |
Func<DynamicPlaceholderRenderContext, FluentTagBuilder> chromeResolver, int count = 1, int maxCount = 0, | |
int seed = 0) | |
{ | |
return sitecoreHelper.DynamicPlaceholder(placeholderName, c => chromeResolver(c).InnerBuilder, count, | |
maxCount, seed); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment