XF 2.1 [SOLVED] How can I access a new relation added to the Post entity?

So I've setup a relation on the post entity using the entity_structure event. I can access it fine throughout the code (or by including it in the "with" of the finder). However, there's one part I don't understand. I want to access this relation within the post_macros template modification I made, but there, the relation doesn't exist on $post - how can I make sure the $post var in the template also includes the new relation?

Hope this makes any sense, tried searching the forums/Google, but couldn't really find anything. Would love to hear any way to do it. Fairly new to XenForo development, so loads to learn.
 
Fixed it by using the defaultWith option on the entity, loading the new relation on Post. In this case, also the proper solution (at least, feels likt it), as it always should be available.
 
Top Bottom