Using assets in advanced module

edited March 2013 in Modules
I would like to be able to attach some images to some of the data in my advanced module. I would also like to be able to upload them if required...

How do I go about doing that and is there an example of doing that I can look at.

I am using 0.93.

Comments

  • edited 9:57PM
    Does this advanced module have sub modules (models), attached to it. If so, In .93, if you have a model that has a field name that ends with "image" or "img", then it will create 2 fields automatically when editing. One for uploading an image (a field of type "file") and one for selecting an image from the asset module (this is done by adding a "class" => "add_edit" to one of your models form field params:
    http://www.getfuelcms.com/user_guide/modules/forms

    In 1.0 this has been improved quite a bit and there is now an "asset" field type that allows you to both upload or select a file from a single field while editing your module data.
  • edited 9:57PM
    Cheers for the reply.. I went for a different approach and just load the assest_model and use the methods from that.
Sign In or Register to comment.