I am trying to put a module inside another component. According to https://www.joomlashack.com/blog/joomla-how-to/module-position-component/ I can put
<?php echo JHtml::_('content.prepare', '{loadposition myposition}'); ?>
in the PHP file in question.
I've tried this but it didn't work for me, this line of code simply doesn't output anything to my HTML. There is no error thrown either. So is this still technique still available? Or did I miss anything?