Here you can use the same idiom as other widgets, and pass getVariable("currentTiddler") as the second argument of the getAttribute call