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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

displaying image of another page


Reply

2 Posts   678 Views

Avatar
Rishi

5 February 2010 at 8:43am Community Member, 97 Posts

hello
i have created a template where i am inserting a image via image filed in cms,i want to display this image into another page,so that if i create 6 different page with this template and insert an image in all this 6 pages, then thumbnail of all the pages will be displayed in the holder page.my site tree is like this

-Teacher
-student
-Universities
--university 1
--university 2
--university 3
--university 4
--university 5
--university 6
-about us
-Contact us
what i want is in page university1,university2,university3,university4,university5,university6 there will be a provision of uploading a image(not through default editor) and that image will be displayed on page Universities along with a link on it so that when anyone click on the image in page Universitiesc it will open the corresponding page in which it is inserted.
Code will be a great help as i am new in silverstripe.

thank you in advance

Avatar
carlos

5 February 2010 at 2:40pm (Last edited: 5 February 2010 2:40pm), Community Member, 41 Posts

Hi Rishi,

So you want to create a template to display pages under Universities?

if that's what you want, you can use <% control Children %> in your template, it will list all page children

<% control Children %>
$Title
$Image
<% end_control %>

this will list all children title and image