Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Is there a way to use <% control ChildrenOf() %> for images??


Go to End


1677 Views

Avatar
lusiton

13 Posts

12 November 2007 at 3:46am

Hi guys.
I use this code to control text instances. I think it would be great idea to use it for a photo gallery but I'm not sure what argument to use in stead of "blog" in this case. I tried Images, Img, Pictures. None of them works. Also is there a way to control how many instances you want to have in each control? Thank you in advance.

<div id="rightSecHead_"><h1>Blog</h1></div>
<div id="rightSecContent_">
<% control ChildrenOf(blog) %>
<h2>$Title</h2>
<p>$Content.LimitWordCount(10)
<a href="$Link"> more </a></p>
<% end_control %>