We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 168
    • 15 Posts
    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 wink i emptied the default value field and changed the front-end.

    I changed [[*myTemplateVar]] to [[*myTemplateVar:default=`myDefaultVal`]].