samedi 23 avril 2016

Passing unknown number of arguments to a link-to inside a component

In a component I am using the link-to helper. The trouble is that I don't know how many items the link will need. For example, a route such as admin.school.user might need two items passed, the school and the user.

Go

In the component, I want the programmer to be able to pass as many url models as necessary



Inside my component, among other things I have the following



Obviously I can't hard code attrs.item1 attrs.item2 because I don't know how many models they will be passing.

How can I do this?




Aucun commentaire:

Enregistrer un commentaire