Created
August 12, 2015 10:33
-
-
Save freakingawesome/7df5dfb9af46f3a463e2 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
env.RegisterHelper("cms_image", (writer, context, args) => | |
{ | |
// ArgApplier from https://gist.github.com/freakingawesome/5d94d14c1110aa174343 | |
ArgApplier.Apply(args, (string name, int forceWidth, int forceHeight) => | |
{ | |
if (!string.IsNullOrWhiteSpace(name) && context.context.ContainsKey(name)) | |
{ | |
string src = context.context[name] as string; | |
// etc. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment