pub fn for_user<'reg, 'rc>(
h: &Helper<'reg, 'rc>,
r: &'reg Handlebars<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output
) -> HelperResultExpand description
A templating helper that tests if current user’s username matches a given string.
Usage:
-
{{#for_user "foo"}}..content..{{/for_user}}Renders content only if current user’s username is “foo”.
-
{{#for_user "foo"}}{{else}}..content..{{/for_user}}Renders content only if current user’s username is NOT “foo”.