You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116984 File Directory Path per content category

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by keep on Tuesday, 10 December 2024 07:21 GMT

keep

Hello,

I love the "File Directory Path" feature in JCE. It makes the file structure much cleaner and prevents having hundreds of thousands of images in a single directory.

However, I’d like to ask if it’s possible to configure different settings based on Joomla article categories. For example:

  • For the "News" category and all its subcategories, I’d like to use images/news/$year/$month.
  • For other categories, such as a list of partners or events, I’d prefer images/partners or images/events.
  • For uncategorized articles, I’d use just images.

I’m using Joomla 5. When I change the category of an article, the editor reloads. Would it be possible to extend the assignment configuration to support this kind of setup?

Thank you in advance!

Ryan

However, I’d like to ask if it’s possible to configure different settings based on Joomla article categories. For example:

For the "News" category and all its subcategories, I’d like to use images/news/$year/$month.
For other categories, such as a list of partners or events, I’d prefer images/partners or images/events.

You can do this with a Custom Query in Editor Profiles.

  1. Create a new profile for each of your distinct path values, by making a copy of the Default profile.
  2. In the Setup tab, add a unique name for the profile, and set the Ordering to "First"
  3. In the Setup tab, for the Custom Query option, add catid for the Key and the category id for the Value. Sub-categories are not yet supported (I hope to add this in th enext update), so you will need to create a new Custom Query for each sub-category too. You can also use negated values for the catid, eg: !8 will apply to all catid values that are not 8, eg:

  4. Set the File Directory Path for each new profile, eg: images/news/$year/$month
  5. Save the Profile.

For uncategorized articles, I’d use just images.

This can be the "Default" profile without any Custom Query option set, with the File Directory Path blank or set to "images".

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

keep

great, thanks