This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

svencieslok24308
svencieslok24308

Hello together, I have a small problem... I want wo display an relation inside of a repeater field. The problem is that I only get the ID back, not we object itself. The problem is pretty good described here: https://stackoverflow.com/questions/44495725/relation-in-a-repeater-display-relation-attributes (with no solution).

Is there any way to get a direct connection to the object itself? Thank you

marco.messa325452
marco.messa325452

Did you properly set up the relation in both models? I'm not at the computer now, but if you can't retrieve the category object, you could create an helper method "getCategoryById" inside the model, and then extend twig like described here and call it in your views

edit* Maybe the helper method doesn't need to be bound to the model, because if you can't retrieve it in your view you'll not be able to call it!

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.