print_media_templates not applied in media manager plugin

Ok I’ve figured some things out by now: I was not returning the rendered image into anything

In the javascript I have a render function

media.view.AttachmentsBrowser = media.view.AttachmentsBrowser.extend({
        render: function(){
            var that = this;
            if(this.collection){
                if(this.collection.models.length > 0){
                    this.clearImages();
                    _.each(this.collection.models, function (item){
                        //old way: that.renderImage(item);
                        //now:
                        this.$el.find('#lastli').before(that.renderImage(item));
                    }, this);
                }
            }
        }
});

Obviously my images weren’t showing…

But since I don’t really need a template, I removed this code, so the standard tmpl is taken.

My quest continues though, for now I’m having trouble with filling the data object used in the media template, but I’ll post another question for this, since it’s another problem.
In case interested, can you find the question here: attachment media-template data model (data.size.url)

Leave a Comment