Hi,
I have a template var which i want to have the pagetitle as default value, if no value is given.
I tried the following, but when editing a document it just shows the same line:
@EVAL return $modx->resource->get('pagetitle');
EDIT
Nevermind

i emptied the default value field and changed the front-end.
I changed
[[*myTemplateVar]] to [[*myTemplateVar:default=`myDefaultVal`]].