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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Show images in ArticleHolder


Go to End
Reply


21 Posts   3194 Views

Avatar
UncleCheese

Forum Moderator, 4094 Posts

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

Avatar
frabraha

Community Member, 49 Posts

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: [url=http://www.secret-design.com/ArticleHolder.jpg]Example[/url]

Hopes this clear things up a bit on what I'm trying to do..

Avatar
UncleCheese

Forum Moderator, 4094 Posts

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

Avatar
frabraha

Community Member, 49 Posts

17 December 2009 at 9:24pm

Just to be sure that I have this right.. $ArticleBildeProperty1 is something like $Attachment or $Name, right?

Avatar
frabraha

Community Member, 49 Posts

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

Go to Top