3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1081 Views |
-
<% control something %> and output "this" inside of the control

24 March 2010 at 1:27am Last edited: 24 March 2010 3:17am
Hello all,
i have a control in a template like this:
<% control Images %>
<% end_control %>
the control iterates a list of images. each object is type of Image (standard silverstripe class)
actually i would like to output the image like this inside the control<% control Images %>
$Image
<% end_control %>of course this is not working because I think I can only access properties of an object inside of a control. Image is not property of image. but can I somehow output the object itself? by using something like $this ...? i need it to say $this.SetWidth(100)
thanks in advance,
florian -
Re: <% control something %> and output "this" inside of the control

24 March 2010 at 9:30am
If you are inside that control, and each item is an image object then you don't need this. You can just do $SetWidth(100)
-
Re: <% control something %> and output "this" inside of the control

25 March 2010 at 9:58pm
thanx Willr!
worked fine.
| 1081 Views | ||
|
Page:
1
|
Go to Top |


