Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

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

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

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

Page: 1
Go to End
Author Topic: 1232 Views
  • lusiton
    Avatar
    13 Posts

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

    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 %>

    1232 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.