KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way to do ternary operators in Velocity? This is what I'd like to do: #set ($name = ($args.get(0) == "") ? "default" : $args.get(0)) Instead of chunky if-else #if ($args.get(0) == "") #set ($name = "default") #else #set ($name = $args.get(0)) #end Any ideas?
Tags (comma-separated)
Save Edits
Cancel