Search

I have written an extension that creates directory before creating an entry, and renames the directory when updating entry. This section is collection-section and I have Select Box Link -field in another section that gets it values from that collection-section.

But when I create an entry to that another section (where the SBL field is used), I need to change the directory according the selection on the SBL field, so that the file is uploaded to collections directory.

How I could achieve that?

Subscribe to EntryPostCreate delegate and sniff for entries created in Section B (where SBL resides). Check if the Section for given entry is the same as Section B.

so that the file is uploaded to collections directory.

Is it absolutely mandatory that each file reside in a separate directory?

Probably you can better solve the relation between Collections and Section B with a Subsection Manager. Version 2.x is really comprehensive.

Is it absolutely mandatory that each file reside in a separate directory?

Not each file in a separate directory, but group of files in same directory. I mean if I have, for example, "Summer holiday" collection of photos, each photo belonging to that collection goes to same directory. And if there's, for example, "Trip to Norway" collection, all photos belonging to that collection, would go to the same directory.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details