18590 Posts in 4875 Topics by 2285 members
General Questions
SilverStripe Forums » General Questions » Moving to the next step, repeating divs
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 688 Views |
-
Moving to the next step, repeating divs

28 April 2011 at 8:34pm
Well time for me to move on to the next part of SS learning curve (love it by the way, excellent CMS), before when i have wanted to show images on a page i have added an upload field for each image into the CMS and called them into the template in such a way as:
$Image1
$Image2
$Image3and so on, each call already wrapped in its own div, but now im wanting to go further im finding that this isnt giving me a lot of flexibility.
Is there a way that i can have one image upload field (not wanting to clutter up CMS) and just one call, IE: $Allimages, where the div is not already coded into the page but actualy gets attached to each image when called at the frontend.
Thanks
-
Re: Moving to the next step, repeating divs

1 May 2011 at 4:16am
Check out DataObjectManager or ComplexTableField. You can attach dataobjects through has_many in the model and then add 1 or many images to a particular page.
Josh
-
Re: Moving to the next step, repeating divs

2 May 2011 at 3:02am Last edited: 2 May 2011 3:03am
Yea ive done it with dataobject manager as well. See the tutorials for dataobject manager. The resource example is a great starting point to create an easy repeater for images.
I included an example i made not too long ago wich is a basic image repeater with title and description. Very basic. Maybe it will help you create what you want.
-
Re: Moving to the next step, repeating divs

2 May 2011 at 8:25pm
Thanks to both of you for your input, i had a feeling that Data Object Manager was going to be the way forward as it seems to be the logical next step.
@ Dusky,
always helps to have a working code example for a reference, thanks
Regards
Martin -
Re: Moving to the next step, repeating divs

2 May 2011 at 9:00pm Last edited: 2 May 2011 9:00pm
just to clarify uploadify is a stand alone module for this, dataobjectmanager uses that i think - both excellent, but when only one is required I'd use one
| 688 Views | ||
|
Page:
1
|
Go to Top |




