This does it, PROMPT_SUBST turns on shell code evaluation from inside the prompt
setopt PROMPT_SUBST
function getBasename() {
if [[ -h $PWD ]]; then
printf "("`readlink $PWD`") "
fi
}
export PROMPT='%~ $(getBasename)%# ' # must use single quotes here