Skip to content

Instantly share code, notes, and snippets.

@freakingawesome
Created August 12, 2015 10:33
Show Gist options
  • Save freakingawesome/7df5dfb9af46f3a463e2 to your computer and use it in GitHub Desktop.
Save freakingawesome/7df5dfb9af46f3a463e2 to your computer and use it in GitHub Desktop.
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