Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17478 Posts in 4473 Topics by 1972 members

Archive

SilverStripe Forums » Archive » ComplexTableField with Images

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

Page: 1
Go to End
Author Topic: ComplexTableField with Images 677 Views
  • jjeziorski
    avatar
    Community Member
    11 posts

    ComplexTableField with Images Link to this post

    Hey,

    What I'm trying to get is a ComplexTableField with thumbnails of images (as table column) and some string columns in CMS tab. I don't really need to upload images, i just need a preview of images, since i'll need this to add descriptions to images.

    My ideas for solution:
    1. Pass Image data (URL, width, height) as a string to CTF and interpret data through custom template. (how to get this data from Image datatype, defining CTF?)
    2. Override CTF item rendering method (but i haven't a clue where to start)

    Any ideas, suggestions?
    Thanks,

  • Laax
    avatar
    Community Member
    14 posts

    Re: ComplexTableField with Images Link to this post

    Hi,
    I already succeed doing this before.. but it was as a test and i deleted the code after.
    But, as a tiny clue, here are some tracks I followed:
    - (php) extending the ComplexTableField php class
    - redecorating the same class (see: dataobjectdecorator)

    As far as I remember I finished by redefining an .ss file that renders the table in the CMS (found a post on the forum on how to do it) and extending the php class in order to add a function that returns an Image dataobjectset so that I could loop on it in the ss file.

    Hopes that helps.

    677 Views
Page: 1
Go to Top

Currently Online: Euphemismus

Welcome to our latest member: fearofbuttons

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

Comments on this website? Please give feedback.