on 08-07-2019 3:49 PM
In GTL you can pass parameters to templates, but they need to be values (no %variable% allowed). Is there a way to deference an attribute in the call? E.g., %templateTakingParams(%!table.column.Name%)%. Right now I'm creating a model-level variable before the call and using that, but it seems like a hack.
Turns out you can pass variables.
Pass the variable without the percent signs. For %variable%, use %template(variable)%.
Then dereference it inside the template with %*@1%.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right, you can't pass a variable to a template - I tried it recently. I had to create an extended attibute to pass instead, like you did.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.