def multititle(value):
    """
        Gets the title field only if is set.
        If no title is set the code-name will be used.
        
        Usage::
            {{ category|multititle }}
            {{ product|multititle }}
    """
    return value.name if value.name else value.codename