[BUGFIX] Only render menu properties partial if var is set

``optional`` argument doesnt work as expected here as this is only used for sections and not partials