Using custom attributes and template conditionals