7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » ImageDataObjectManager, get $width from first element
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 882 Views |
-
ImageDataObjectManager, get $width from first element

7 January 2010 at 2:43am
Hi,
I want to get the $width property from the first Attachment.
<% if Screenshots %>
<% control Screenshots %>
<h3>$Name</h3>
<p>$Description</p>
<% control Attachment %>$URL<% end_control %>
<% end_control %>
<% end_if %><% control Attachment %>$width<% end_control %> is working fine but returns the properties for all elements.
any idea? Thanks much!
patte -
Re: ImageDataObjectManager, get $width from first element

7 January 2010 at 2:52am
Why not just..
<% control Screenshots %>
<% if First %>
$Attachment.Width
<% else %>
$Attachment.URL
<% end_if %>
<% end_control %> -
Re: ImageDataObjectManager, get $width from first element

7 January 2010 at 2:58am
ahhh... thanks ;-)
| 882 Views | ||
|
Page:
1
|
Go to Top |

