7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Show images in ArticleHolder
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 2660 Views |
-
Re: Show images in ArticleHolder

16 December 2009 at 4:04am
If ArticlePage $has_many 'ArticleBildes' and ArticleBilde $has_one 'ArticlePage', then all you need on your ArticlePage.ss is:
<% control ArticleBildes.First %>
$ArticleBildeProperty1. $ArticleBildeProperty2
<% end_control %> -
Re: Show images in ArticleHolder

16 December 2009 at 10:07pm
hm..sorry I think you misunderstand me here, the problem is NOT in the ArticlePage.ss its in ArticleHolder.ss
As I have said before, I have an ArticleHolder.ss template that shows a list of ArticlePages that should show the first image of each ArticlePage that have image added to them.I've added an image showing what I mean: Example
Hopes this clear things up a bit on what I'm trying to do..
-
Re: Show images in ArticleHolder

17 December 2009 at 3:54am
If ArticlePages are children of ArticleHolder, than all you need in ArticleHolder.ss is:
<% control Children %>
$Title
<% control ArticleBildes.First %>
$ArticleBildeProperty1. $ArticleBildeProperty2
<% end_control %>
<% end_control %> -
Re: Show images in ArticleHolder

17 December 2009 at 9:24pm
Just to be sure that I have this right.. $ArticleBildeProperty1 is something like $Attachment or $Name, right?
-
Re: Show images in ArticleHolder

17 December 2009 at 10:01pm
Never mind, got it working with that last code
Tried it on a different template and that worked, must be something very wrong with Articleholder template..
Thanks for the help
| 2660 Views | ||
| Go to Top |

