Add links parameters from parent

This fix intend to get links parameters from parent when editing a gallery to keep the correct media context