Results 1 to 4 of 4

Thread: Catalog : custom folder for images or files

  1. #1
    User
    Join Date
    01-26-10.
    Posts
    37

    Default Catalog : custom folder for images or files

    Hi

    I have a catalog of items that can be modified by some members (i.e. each member has his own set of items). I want each member to upload files in a particular directory (e.g. catalog_idmember) . Can it be easily done ?
    Please help

    aida

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Catalog : custom folder for images or files

    the member system includes the ability to specify a home folder where things can be uploaded.

  3. #3
    User
    Join Date
    01-26-10.
    Posts
    37

    Default Re: Catalog : custom folder for images or files

    Right, but the members accounts are created dynamically. So have to be their personal folders.

  4. #4
    User
    Join Date
    04-10-11.
    Posts
    162

    Default Re: Catalog : custom folder for images or files

    Contao does this by default using the member's name I think. You just have to choose the directory where all the user specific directories will be created.

    If you need something more bespoke you could do this using a custom extension that uses the activateAccount hook.

    This hook is called whenever an account is activated. Whenever an account is activated you could run some code that creates a directory for them using their id in the directory title.

    It's the first hook here:
    http://www.contao.org/en/hooks.html

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •